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

Function writeCacheStep

pkg/workflow/cache.go:418–429  ·  view source on GitHub ↗
(builder *strings.Builder, cache map[string]any, idx int, total int)

Source from the content-addressed store, hash-verified

416}
417
418func writeCacheStep(builder *strings.Builder, cache map[string]any, idx int, total int) {
419 stepName := resolveCacheStepName(cache, idx, total)
420 fmt.Fprintf(builder, " - name: %s\n", stepName)
421 fmt.Fprintf(builder, " uses: %s\n", getActionPin("actions/cache"))
422 builder.WriteString(" with:\n")
423 writeCacheStepValue(builder, "key", cache["key"])
424 writeCachePath(builder, cache["path"])
425 writeCacheRestoreKeys(builder, cache["restore-keys"])
426 writeCacheStepValue(builder, "upload-chunk-size", cache["upload-chunk-size"])
427 writeCacheStepValue(builder, "fail-on-cache-miss", cache["fail-on-cache-miss"])
428 writeCacheStepValue(builder, "lookup-only", cache["lookup-only"])
429}
430
431func resolveCacheStepName(cache map[string]any, idx int, total int) string {
432 stepName := "Cache"

Callers 1

generateCacheStepsFunction · 0.85

Calls 5

resolveCacheStepNameFunction · 0.85
getActionPinFunction · 0.85
writeCacheStepValueFunction · 0.85
writeCachePathFunction · 0.85
writeCacheRestoreKeysFunction · 0.85

Tested by

no test coverage detected