use token for cache controller
This commit is contained in:
1 file changed
+2
-1
@@ -13,13 +13,14 @@ jobs:
|
|||||||
- name: Clear cache
|
- name: Clear cache
|
||||||
uses: actions/github-script@v6
|
uses: actions/github-script@v6
|
||||||
with:
|
with:
|
||||||
|
github-token: ${{ secrets.cache_controller }}
|
||||||
script: |
|
script: |
|
||||||
console.log("About to clear")
|
console.log("About to clear")
|
||||||
|
|
||||||
while (true) {
|
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) {
|
if (caches.data.actions_caches.length === 0) {
|
||||||
break
|
break
|
||||||
|
|||||||
Reference in new issue
Block a user