File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
.github/actions/save-runtime-cache Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -26,13 +26,23 @@ runs:
2626 - id : delete
2727 if : ${{ steps.lookup-runtime-cache.outputs.cache-hit }}
2828 uses : actions/github-script@v7
29+ env :
30+ RUNTIME_CACHE_KEY : ${{ steps.lookup-runtime-cache.outputs.key }}
2931 with :
3032 script : |
31- github.rest.actions.deleteActionsCacheById({
33+ const { RUNTIME_CACHE_KEY } = process.env
34+ const runtime_caches = await github.rest.actions.getActionsCacheList({
3235 owner: context.repo.owner,
3336 repo: context.repo.repo,
34- cache_id: steps.lookup-runtime-cache.outputs.key ,
37+ key: `${RUNTIME_CACHE_KEY}` ,
3538 })
39+ for (const runtime_cache of runtime_caches.data.actions_caches) {
40+ github.rest.actions.deleteActionsCacheById({
41+ owner: context.repo.owner,
42+ repo: context.repo.repo,
43+ cache_id: runtime_cache.id,
44+ })
45+ }
3646
3747 - id : save
3848 uses : actions/cache/save@v4
You can’t perform that action at this time.
0 commit comments