File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77
88permissions :
99 actions : write
10- contents : read
1110
1211jobs :
1312 cleanup :
1413 runs-on : ubuntu-latest
1514 steps :
16- - name : Check out code
17- uses : actions/checkout@v6
18-
1915 - name : Cleanup
2016 run : |
2117 gh extension install actions/gh-actions-cache
@@ -24,13 +20,14 @@ jobs:
2420 BRANCH="refs/pull/${{ github.event.pull_request.number }}/merge"
2521 echo "Fetching list of cache keys"
2622 cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH | cut -f 1)
27- ## Setting this to not fail the workflow while deleting cache keys.
28- set +e
2923 echo "Deleting caches..."
24+ ## Temporarily disable errexit so individual delete failures don't abort the loop.
25+ set +e
3026 for cacheKey in $cacheKeysForPR
3127 do
3228 gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm
3329 done
30+ set -e
3431 echo "Done"
3532 env :
3633 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments