Added BYOS Hanami URI delivery mode #17
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: Cache Cleanup | |
| on: | |
| pull_request: | |
| types: [closed] | |
| jobs: | |
| cleanup: | |
| name: Clean PR Cache | |
| runs-on: ubuntu-latest | |
| permissions: | |
| actions: write | |
| steps: | |
| - name: Cleanup PR caches | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const ref = `refs/pull/${context.issue.number}/merge`; | |
| const caches = await github.rest.actions.getActionsCacheList({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| ref: ref, | |
| }); | |
| console.log(`Found ${caches.data.total_count} cache(s) for PR #${context.issue.number}`); | |
| for (const cache of caches.data.actions_caches) { | |
| console.log(`Deleting cache: ${cache.key} (${cache.size_in_bytes} bytes)`); | |
| await github.rest.actions.deleteActionsCacheById({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| cache_id: cache.id, | |
| }); | |
| } | |
| console.log('Cache cleanup complete'); |