diff --git a/.github/workflows/clear-caches.yaml b/.github/workflows/clear-caches.yaml index c2c54cbc..ec024cae 100644 --- a/.github/workflows/clear-caches.yaml +++ b/.github/workflows/clear-caches.yaml @@ -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,