Skip to content

Commit

Permalink
'feedback' about deleted entries
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanBout authored Jan 25, 2025
1 parent 8b5fac0 commit 0f97214
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,23 @@ jobs:
## Setting this to not fail the workflow while deleting cache keys.
set +e
echo "Deleting caches..."
deletedAny=0
for cacheKey in $cacheKeysForPR
do
deletedAny=1
gh cache delete $cacheKey
exitCode="$?"
if [ "$exitCode" -eq 0 ]; then
echo "deleted cache entry $cacheKey"
else
echo "failed to delete cache entry $cacheKey - exited with code $exitCode"
fi
done
echo "Done"
if [ "$deletedAny" -eq 0 ]; then
echo "No cache entries found"
else
echo "Done"
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}

0 comments on commit 0f97214

Please sign in to comment.