Skip to content

Commit 2668013

Browse files
committed
chore: Remove caches without external dependencies
1 parent c131970 commit 2668013

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

.github/workflows/clear-pr-caches.yml

+11-4
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,16 @@ permissions:
99

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

0 commit comments

Comments
 (0)