Skip to content

Commit

Permalink
Fix clear caches pagination (#262)
Browse files Browse the repository at this point in the history
  • Loading branch information
EnricoMi authored Nov 4, 2024
1 parent ebf0da1 commit a91393a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/clear-caches.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ jobs:
uses: actions/github-script@v7
with:
script: |
const caches = await github.rest.actions.getActionsCacheList({
owner: context.repo.owner,
repo: context.repo.repo,
})
for (const cache of caches.data.actions_caches) {
const caches = await github.paginate(
github.rest.actions.getActionsCacheList.endpoint.merge({
owner: context.repo.owner,
repo: context.repo.repo,
})
)
for (const cache of caches) {
console.log(cache)
github.rest.actions.deleteActionsCacheById({
owner: context.repo.owner,
Expand Down

0 comments on commit a91393a

Please sign in to comment.