File tree Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Original file line number Diff line number Diff line change @@ -22,20 +22,10 @@ jobs:
2222 cleanup :
2323 runs-on : ubuntu-latest
2424 steps :
25+ - uses : actions/checkout@v4
2526 - name : Cleanup
26- run : |
27- echo "Fetching list of cache key"
28- cacheKeysForPR=$(gh cache list --ref $BRANCH --limit 100 --json id --jq '.[].id')
29-
30- ## Setting this to not fail the workflow while deleting cache keys.
31- set +e
32- echo "Deleting caches..."
33- for cacheKey in $cacheKeysForPR
34- do
35- gh cache delete $cacheKey
36- done
37- echo "Done"
27+ run : gh cache list --ref $BRANCH --json id --jq '.[].id' | xargs -I {} gh cache delete {}
3828 env :
3929 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4030 GH_REPO : ${{ github.repository }}
41- BRANCH : refs/pull/${{ github.event.pull_request. number }}/merge
31+ BRANCH : refs/pull/${{ github.event.number }}/merge
You can’t perform that action at this time.
0 commit comments