MCPcopy Create free account
hub / github.com/github/gh-aw / ActionsBuildCommand

Function ActionsBuildCommand

pkg/cli/actions_build_command.go:27–54  ·  view source on GitHub ↗

ActionsBuildCommand builds all custom GitHub Actions by bundling JavaScript dependencies

()

Source from the content-addressed store, hash-verified

25
26// ActionsBuildCommand builds all custom GitHub Actions by bundling JavaScript dependencies
27func ActionsBuildCommand() error {
28 actionsDir := "actions"
29
30 actionsBuildLog.Print("Starting actions build")
31
32 // Get list of action directories
33 actionDirs, err := getActionDirectories(actionsDir)
34 if err != nil {
35 return err
36 }
37
38 if len(actionDirs) == 0 {
39 fmt.Fprintln(os.Stderr, console.FormatWarningMessage("No action directories found in actions/"))
40 return nil
41 }
42
43 fmt.Fprintln(os.Stderr, console.FormatInfoMessage("Building all actions..."))
44
45 // Build each action
46 for _, actionName := range actionDirs {
47 if err := buildAction(actionsDir, actionName); err != nil {
48 return fmt.Errorf("failed to build action %s: %w", actionName, err)
49 }
50 }
51
52 fmt.Fprintln(os.Stderr, console.FormatSuccessMessage(fmt.Sprintf("✨ All actions built successfully (%d actions)", len(actionDirs))))
53 return nil
54}
55
56// ActionsValidateCommand validates all action.yml files
57func ActionsValidateCommand() error {

Callers 3

mainFunction · 0.92

Calls 7

FormatWarningMessageFunction · 0.92
FormatInfoMessageFunction · 0.92
FormatSuccessMessageFunction · 0.92
getActionDirectoriesFunction · 0.85
buildActionFunction · 0.85
PrintMethod · 0.80
ErrorfMethod · 0.45