Skip to content

Commit

Permalink
chore: Remove caches without external dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
KapJI committed Nov 11, 2024
1 parent c131970 commit 2668013
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/clear-pr-caches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,16 @@ permissions:

jobs:
clear-caches:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: clear-caches
uses: theAngularGuy/clear-cache-of-pull-request@60c83956d63c7b3745d6cde10d711aa0e50c2501
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
BRANCH: refs/pull/${{ github.event.pull_request.number }}/merge
run: |
cacheKeysForPR=$(gh cache list --ref "$BRANCH" --limit 100 --json id --jq '.[].id')
set +e
for cacheKey in $cacheKeysForPR; do
gh cache delete "$cacheKey"
done

0 comments on commit 2668013

Please sign in to comment.