Skip to content

chore(deps): bump actions/setup-go from 5.0.1 to 5.0.2 #29

chore(deps): bump actions/setup-go from 5.0.1 to 5.0.2

chore(deps): bump actions/setup-go from 5.0.1 to 5.0.2 #29

Workflow file for this run

name: Clean up per-branch caches
on:
pull_request:
types:
- closed
workflow_dispatch:
permissions:
contents: read
jobs:
cleanup:
runs-on: ubuntu-latest
permissions:
actions: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Cleanup
run: |
gh extension install actions/gh-actions-cache
BRANCH=refs/pull/${{ github.event.pull_request.number }}/merge
echo "Fetching list of cache keys"
keys=$(gh actions-cache list -R $GITHUB_REPOSITORY -B $BRANCH -L 100 | cut -f 1)
set +e
echo "Deleting caches..."
for key in $keys ; do
gh actions-cache delete $key -R $GITHUB_REPOSITORY -B $BRANCH --confirm
done
echo "Done"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}