Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing cache cleanup #2124

Merged
merged 2 commits into from
Jun 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/cache_cleaner.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: cleanup caches by a branch
name: cleanup caches
on:
workflow_dispatch:
pull_request:
Expand Down Expand Up @@ -40,6 +40,7 @@ jobs:
gh extension install actions/gh-actions-cache

REPO=${{ github.repository }}
echo $REPO

echo "Fetching list of cache key"
cacheKeysForPR=$(gh actions-cache list -R $REPO | cut -f 1 )
Expand All @@ -49,7 +50,7 @@ jobs:
echo "Deleting caches..."
for cacheKey in $cacheKeysForPR
do
gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm && echo "Deleting cache with key: $cacheKey"
gh actions-cache delete $cacheKey -R $REPO --confirm && echo "Deleting cache with key: $cacheKey"
done
echo "Done"
env:
Expand Down