File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 88jobs :
99 cleanup :
1010 runs-on : ubuntu-latest
11+ permissions :
12+ actions : write
1113 steps :
1214 - name : Cleanup
1315 run : |
14- gh extension install actions/gh-actions-cache
15-
16- echo "Fetching list of cache key"
17- cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH -L 100 | cut -f 1 )
16+ echo "Fetching list of cache keys"
17+ cacheKeysForPR=$(gh cache list --ref $BRANCH --limit 100 --json id --jq '.[].id')
1818
1919 ## Setting this to not fail the workflow while deleting cache keys.
2020 set +e
2121 echo "Deleting caches..."
2222 for cacheKey in $cacheKeysForPR
2323 do
24- gh actions- cache delete $cacheKey -R $REPO -B $BRANCH --confirm
24+ gh cache delete $cacheKey
2525 done
2626 echo "Done"
2727 env :
28- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
29- REPO : ${{ github.repository }}
28+ GH_TOKEN : ${{ github.token }}
29+ GH_REPO : ${{ github.repository }}
3030 BRANCH : refs/pull/${{ github.event.pull_request.number }}/merge
You can’t perform that action at this time.
0 commit comments