Skip to content

Commit

Permalink
trying to fix rate limiting
Browse files Browse the repository at this point in the history
  • Loading branch information
mdprotacio committed Dec 9, 2023
1 parent d8baa07 commit f700c92
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/dockerhub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,8 @@ jobs:
script: |
console.log("About to clear")
let caches = null
let loop = 0;
const sleep = ms => new Promise(r => setTimeout(r, ms));
do {
console.log("Iteration: " + loop)
caches = await github.rest.actions.getActionsCacheList({
owner: context.repo.owner,
repo: context.repo.repo,
Expand All @@ -105,6 +104,7 @@ jobs:
cache_id: cache.id,
})
}
loop++
} while(caches && loop < 2)
//sleep 30 seconds before iterating again, to combat ratelimitting
await sleep(30000)
} while(caches)
console.log("Clear completed")

0 comments on commit f700c92

Please sign in to comment.