use token for cache controller

This commit is contained in:
Jonathan Kelley 2024-01-08 18:50:47 -08:00
parent 65191eb002
commit 8f8cfdf2fa
No known key found for this signature in database
GPG key ID: 1FBB50F7EB0A08BE

View file

@ -13,13 +13,14 @@ jobs:
- name: Clear cache
uses: actions/github-script@v6
with:
github-token: ${{ secrets.cache_controller }}
script: |
console.log("About to clear")
while (true) {
const caches = await github.rest.actions.getActionsCacheList({
owner: context.repo.owner,
repo: context.repo.repo,
repo: context.repo.repo
})
if (caches.data.actions_caches.length === 0) {
break