update cache list

This commit is contained in:
Jonathan Kelley committed 2024-01-08 18:39:26 -08:00
1 parent 5e08384a29
commit 65191eb002
1 file changed
+6
+6
View File
@@ -15,10 +15,15 @@ jobs:
with: with:
script: | script: |
console.log("About to clear") console.log("About to clear")
while (true) {
const caches = await github.rest.actions.getActionsCacheList({ const caches = await github.rest.actions.getActionsCacheList({
owner: context.repo.owner, owner: context.repo.owner,
repo: context.repo.repo, repo: context.repo.repo,
}) })
if (caches.data.actions_caches.length === 0) {
break
}
for (const cache of caches.data.actions_caches) { for (const cache of caches.data.actions_caches) {
console.log(cache) console.log(cache)
github.rest.actions.deleteActionsCacheById({ github.rest.actions.deleteActionsCacheById({
@@ -27,4 +32,5 @@ jobs:
cache_id: cache.id, cache_id: cache.id,
}) })
} }
}
console.log("Clear completed") console.log("Clear completed")