Fix compat file #49
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Cleanup PR cache | |
on: | |
pull_request: | |
types: | |
- closed | |
jobs: | |
cleanup: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Cleanup cache | |
run: | | |
gh extension install actions/gh-actions-cache | |
REPO='${{ github.repository }}' | |
BRANCH='refs/pull/${{ github.event.pull_request.number }}/merge' | |
readarray -t CACHE_KEYS < <(gh actions-cache list --repo "$REPO" --branch "$BRANCH" --limit 100 | cut --fields=1) | |
for CACHE_KEY in "${CACHE_KEYS[@]}"; do | |
gh actions-cache delete "$CACHE_KEY" --repo "$REPO" --branch "$BRANCH" --confirm | |
done | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |