Skip to content

Commit 9afca73

Browse files
jpluscplusmmvdan
authored andcommitted
internal/ci: allow additional cache modes
This aligns the implementation of base's setupCaches.#additionalCaches with #additionalCachePaths. This allows the `cache` key's value to be added to, as is the case with the `path` key. Signed-off-by: Jonathan Matthews <[email protected]> Change-Id: I3f4eaa5b21b13fcc53bcd380130916cb7eb10933 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1218746 Reviewed-by: Daniel Martí <[email protected]> TryBot-Result: CUEcueckoo <[email protected]>
1 parent 9620eae commit 9afca73

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

internal/ci/base/github.cue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -171,15 +171,15 @@ setupCaches: {
171171
if: "github.event_name != 'schedule' && matrix.runner != '\(windowsMachine)'"
172172
uses: "namespacelabs/nscloud-cache-action@v1"
173173
with: {
174-
cache: "go"
175-
for name in #additionalCaches {
176-
cache: name
177-
}
178-
174+
let cacheModes = list.Concat([[
175+
"go",
176+
], #additionalCaches])
179177
let cachePaths = list.Concat([[
180178
"${{ runner.temp }}/staticcheck",
181179
], #additionalCachePaths])
182-
path: strings.Join(cachePaths, "\n")
180+
181+
cache: strings.Join(cacheModes, "\n")
182+
path: strings.Join(cachePaths, "\n")
183183
}
184184
},
185185

0 commit comments

Comments
 (0)