Skip to content

Commit

Permalink
Update clear_cache.yml
Browse files Browse the repository at this point in the history
Now deletes the 100 largest caches per run. Updated to `actions/github-script@7`
  • Loading branch information
jasigal authored Jun 6, 2024
1 parent f63f7dd commit f4b0133
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/clear_cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Clear cache
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
console.log("About to clear")
const caches = await github.rest.actions.getActionsCacheList({
owner: context.repo.owner,
repo: context.repo.repo,
sort: size_in_bytes,
direction: desc,
per_page: 100,
})
for (const cache of caches.data.actions_caches) {
console.log(cache)
Expand Down

0 comments on commit f4b0133

Please sign in to comment.