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

Function saveActionCache

pkg/cli/compile_infrastructure.go:47–68  ·  view source on GitHub ↗

saveActionCache saves the action cache after all compilations

(actionCache *workflow.ActionCache, verbose bool)

Source from the content-addressed store, hash-verified

45
46// saveActionCache saves the action cache after all compilations
47func saveActionCache(actionCache *workflow.ActionCache, verbose bool) error {
48 if actionCache == nil {
49 return nil
50 }
51
52 compileInfrastructureLog.Print("Saving action cache")
53
54 if err := actionCache.Save(); err != nil {
55 compileInfrastructureLog.Printf("Failed to save action cache: %v", err)
56 if verbose {
57 fmt.Fprintln(os.Stderr, console.FormatWarningMessage(fmt.Sprintf("Failed to save action cache: %v", err)))
58 }
59 return err
60 }
61
62 compileInfrastructureLog.Print("Action cache saved successfully")
63 if verbose {
64 fmt.Fprintln(os.Stderr, console.FormatSuccessMessage("Action cache saved to "+actionCache.GetCachePath()))
65 }
66
67 return nil
68}

Callers 3

runPostProcessingFunction · 0.85
compileAllWorkflowFilesFunction · 0.85

Calls 6

FormatWarningMessageFunction · 0.92
FormatSuccessMessageFunction · 0.92
PrintMethod · 0.80
SaveMethod · 0.80
GetCachePathMethod · 0.80
PrintfMethod · 0.45

Tested by

no test coverage detected