Skip to content
name: cleanup caches by a branch
on:
push:
branches: [ clean-runner-cache ]
workflow_dispatch:
jobs:
cleanup:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Cleanup
run: |
gh extension install actions/gh-actions-cache
REPO=${{ github.repository }}
BRANCH="devops"
gh actions-cache delete -R $REPO -B $BRANCH --confirm
echo "Done"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}