Skip to content

Avoid blocking when prepping pragmas for inlay #15

Avoid blocking when prepping pragmas for inlay

Avoid blocking when prepping pragmas for inlay #15

Workflow file for this run

name: Clear PR caches
on:
pull_request:
# triggers on close / merge of a PR
types:
- closed
jobs:
cleanup:
runs-on: ubuntu-latest
permissions:
actions: write
steps:
- name: Cleanup caches for closed PR
# remove all cache entries for this PR
# caches usability hierarchy : master → PR
# other PRs / master cannot reuse them
# so clear them when the PR is closed or merged
run: |
gh cache list --ref refs/pull/${{ github.event.pull_request.number }}/merge --json id \
| jq -r '.[].id' \
| xargs -I{} gh cache delete {}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}