Skip to content

Cleanup caches

Cleanup caches #1

Workflow file for this run

name: Cleanup caches
on:
workflow_dispatch:
jobs:
cleanup:
runs-on: ubuntu-latest
permissions:
actions: write
steps:
- name: Flush all caches
run: |
echo "Fetching list of all cache keys"
cacheKeys=$(gh cache list --limit 100 --json id --jq '.[].id')
set +e
echo "Deleting all caches..."
for cacheKey in $cacheKeys
do
gh cache delete $cacheKey
done
echo "Done"
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}