fix(hato): stop hammering a dead API and make the cache max age work #43
Workflow file for this run
This file contains hidden or 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 caches | |
| on: | |
| pull_request: | |
| types: [closed] | |
| jobs: | |
| cleanup: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6 | |
| - name: Delete PR branch caches | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| echo "Fetching caches for PR #${{ github.event.pull_request.number }}..." | |
| gh cache list \ | |
| --ref "refs/pull/${{ github.event.pull_request.number }}/merge" \ | |
| --limit 100 --json id -q '.[].id' | | |
| xargs -I{} gh cache delete {} || true | |
| echo "Done." |