diff --git a/.github/workflows/clear-cache.yml b/.github/workflows/clear-cache.yml index 4972601df..1bed1ec52 100644 --- a/.github/workflows/clear-cache.yml +++ b/.github/workflows/clear-cache.yml @@ -9,9 +9,10 @@ permissions: jobs: clear-cache: 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") @@ -19,12 +20,14 @@ jobs: owner: context.repo.owner, repo: context.repo.repo, }) + for (const cache of caches.data.actions_caches) { console.log(cache) - github.rest.actions.deleteActionsCacheById({ + await github.rest.actions.deleteActionsCacheById({ owner: context.repo.owner, repo: context.repo.repo, cache_id: cache.id, }) } + console.log("Clear completed")