From f4b01335acc3ec760cb7b348de6358644bcac39e Mon Sep 17 00:00:00 2001 From: Jesse Sigal Date: Thu, 6 Jun 2024 15:18:17 +0100 Subject: [PATCH] Update clear_cache.yml Now deletes the 100 largest caches per run. Updated to `actions/github-script@7` --- .github/workflows/clear_cache.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/clear_cache.yml b/.github/workflows/clear_cache.yml index 4972601..b40b0b8 100644 --- a/.github/workflows/clear_cache.yml +++ b/.github/workflows/clear_cache.yml @@ -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)