From abbe94b0b624ae8193b6e64d364dc858b5a3415e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jeffrey=20Bo=CC=88hm?= Date: Sun, 3 May 2026 13:38:44 +0200 Subject: [PATCH] chore(ci): clean up actions cache when closing a pr --- .github/workflows/cleanup-caches.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/cleanup-caches.yml diff --git a/.github/workflows/cleanup-caches.yml b/.github/workflows/cleanup-caches.yml new file mode 100644 index 00000000..d8f8cf68 --- /dev/null +++ b/.github/workflows/cleanup-caches.yml @@ -0,0 +1,17 @@ +name: Cleanup branch caches +on: + pull_request: + types: + - closed +jobs: + cleanup: + runs-on: ubuntu-latest + steps: + - name: Delete all caches for the PR ref + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_REPO: ${{ github.repository }} + run: | + gh cache delete --all \ + --ref refs/pull/${{ github.event.number }}/merge \ + --succeed-on-no-caches