From 5ca286db5bea44df293a27c2369a0c854455b092 Mon Sep 17 00:00:00 2001 From: larzie Date: Tue, 26 Nov 2024 20:07:28 +0300 Subject: [PATCH] Update clear cache action Signed-off-by: larzie --- .github/workflows/clear-cache.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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")