Update clear cache action

Signed-off-by: larzie <lunar@lavache.com>
This commit is contained in:
larzie
2024-11-26 20:07:28 +03:00
committed by GitHub
parent f4b9d16497
commit 5ca286db5b

View File

@@ -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")