From 68d7ef258fde975a56fad99166790de182060131 Mon Sep 17 00:00:00 2001 From: Glax Date: Sun, 29 Sep 2024 00:40:59 +0200 Subject: [PATCH] Update docker-image-cuttingedge.yml Clear Cache on build --- .../workflows/docker-image-cuttingedge.yml | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-image-cuttingedge.yml b/.github/workflows/docker-image-cuttingedge.yml index 35c35b6..5f79ff8 100644 --- a/.github/workflows/docker-image-cuttingedge.yml +++ b/.github/workflows/docker-image-cuttingedge.yml @@ -12,6 +12,25 @@ jobs: runs-on: ubuntu-latest steps: + - name: Clear cache + uses: actions/github-script@v6 + with: + script: | + console.log("About to clear") + const caches = await github.rest.actions.getActionsCacheList({ + owner: context.repo.owner, + repo: context.repo.repo, + }) + for (const cache of caches.data.actions_caches) { + console.log(cache) + github.rest.actions.deleteActionsCacheById({ + owner: context.repo.owner, + repo: context.repo.repo, + cache_id: cache.id, + }) + } + console.log("Clear completed") + - name: Checkout uses: actions/checkout@v4 @@ -42,4 +61,4 @@ jobs: pull: true push: true tags: | - glax/tranga-api:cuttingedge \ No newline at end of file + glax/tranga-api:cuttingedge