File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -46,12 +46,16 @@ jobs:
46
46
with :
47
47
path : data/openskimap
48
48
key : openskimap
49
+ restore-keys : openskimap-
49
50
- name : Download OpenSkiMap
50
51
id : download-openskimap
51
52
# confusing behavior where inputs.refresh_cache acts like a string not a boolean
52
53
# https://stackoverflow.com/questions/76292948/github-action-boolean-input-with-default-value
53
54
# https://github.com/actions/runner/issues/1483
54
55
# the step if condition stopped working around 2025-01-03, so use bash condition to skip the download if files exist
56
+ # NOTE: Do not rely on steps.restore-openskimap.outputs.cache-hit because
57
+ # "For a partial key match via restore-keys or a cache miss, it will be set to false" as per
58
+ # https://github.com/actions/cache/blob/36f1e144e1c8edb0a652766b484448563d8baf46/restore/README.md#L22
55
59
if : steps.inputs.outputs.refresh_cache == 'true' || steps.restore-openskimap.outputs.cache-hit != 'true'
56
60
run : |
57
61
if [ ! -f "data/openskimap/runs.geojson.xz" ]; then
64
68
uses : actions/cache/save@v4
65
69
with :
66
70
path : data/openskimap
67
- key : openskimap
71
+ # overwriting the cache key is not permitted, hence append the run_id on save
72
+ # https://github.com/actions/cache/issues/342#issuecomment-673371329
73
+ key : openskimap-${{ github.run_id }}
68
74
- name : Python Analysis
69
75
env :
70
76
OPENSKISTATS_SOLAR_SEGMENT_COUNT : ${{ steps.inputs.outputs.solar_segment_count }}
You can’t perform that action at this time.
0 commit comments