(builder *strings.Builder, cache map[string]any, idx int, total int)
| 416 | } |
| 417 | |
| 418 | func 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 | |
| 431 | func resolveCacheStepName(cache map[string]any, idx int, total int) string { |
| 432 | stepName := "Cache" |
no test coverage detected