Skip to content

Commit 43fc6f9

Browse files
committed
chore(ci): clean up actions cache when closing a pr
1 parent 2030c34 commit 43fc6f9

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Cleanup branch caches
2+
on:
3+
pull_request:
4+
types:
5+
- closed
6+
jobs:
7+
cleanup:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Delete all caches for the PR ref
11+
env:
12+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13+
GH_REPO: ${{ github.repository }}
14+
run: |
15+
gh cache delete --all \
16+
--ref refs/pull/${{ github.event.number }}/merge \
17+
--succeed-on-no-caches

0 commit comments

Comments
 (0)