We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1049872 + b904e68 commit 7e8072dCopy full SHA for 7e8072d
.github/workflows/cleanup-caches.yml
@@ -13,15 +13,13 @@ jobs:
13
run: |
14
echo "Fetching list of cache keys"
15
cacheKeysForPR=$(gh cache list --ref $BRANCH --limit 100 --json id --jq '.[].id')
16
-
17
- ## Setting this to not fail the workflow while deleting cache keys.
18
- set +e
19
- echo "Deleting caches..."
20
- for cacheKey in $cacheKeysForPR
21
- do
22
- gh cache delete $cacheKey
+ while [ "$cacheKeysForPR" ]; do
+ for cacheKey in $cacheKeysForPR; do
+ echo gh cache delete $cacheKey
+ gh cache delete $cacheKey
+ done
+ cacheKeysForPR=$(gh cache list --ref $BRANCH --limit 100 --json id --jq '.[].id')
23
done
24
- echo "Done"
25
env:
26
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27
GH_REPO: ${{ github.repository }}
0 commit comments