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:
22
22
cleanup :
23
23
runs-on : ubuntu-latest
24
24
steps :
25
+ - uses : actions/checkout@v4
25
26
- 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 {}
38
28
env :
39
29
GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
40
30
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