@@ -162,7 +162,7 @@ jobs:
162
162
with :
163
163
path : ~/Library/Caches/lima/download
164
164
# hashFiles do not seem to support symlinks
165
- key : ${{ runner.os }}-${{ hashFiles('examples/* .yaml') }}
165
+ key : ${{ runner.os }}-${{ hashFiles('templates/default .yaml') }}
166
166
- name : Unit tests
167
167
run : go test -v ./...
168
168
- name : Make
@@ -225,12 +225,15 @@ jobs:
225
225
- uses : actions/setup-go@v5
226
226
with :
227
227
go-version : 1.22.x
228
+ - id : path_for_hashFiles
229
+ # It seems that `hashFiles` cannot use `..` as a path component, so generate a normalized path here.
230
+ run : echo "NORMALIZED=$(realpath --relative-to=$PWD examples/${{ matrix.template }})" >> "$GITHUB_OUTPUT"
228
231
- uses : actions/cache@v4
229
232
with :
230
233
path : ~/.cache/lima/download
231
234
# hashFiles do not seem to support symlinks
232
235
# TODO: more fine-grained cache
233
- key : ${{ runner.os }}-${{ hashFiles('examples/*.yaml' ) }}
236
+ key : ${{ runner.os }}-${{ hashFiles(steps.path_for_hashFiles.outputs.NORMALIZED ) }}
234
237
- name : Make
235
238
run : make
236
239
- name : Install
@@ -401,12 +404,15 @@ jobs:
401
404
- uses : actions/setup-go@v5
402
405
with :
403
406
go-version : 1.22.x
407
+ - id : path_for_hashFiles
408
+ # It seems that `hashFiles` cannot use `..` as a path component, so generate a normalized path here.
409
+ run : echo "NORMALIZED=$(realpath examples/${{ matrix.template }})" >> "$GITHUB_OUTPUT"
404
410
- name : Cache ~/Library/Caches/lima/download
405
411
uses : actions/cache@v4
406
412
with :
407
413
path : ~/Library/Caches/lima/download
408
414
# hashFiles do not seem to support symlinks
409
- key : ${{ runner.os }}-${{ hashFiles('examples/*.yaml' ) }}
415
+ key : ${{ runner.os }}-${{ hashFiles(steps.path_for_hashFiles.outputs.NORMALIZED ) }}
410
416
- name : Make
411
417
run : make
412
418
- name : Install
0 commit comments