mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
ci: clear Firefox cache daily (#11802)
This commit is contained in:
parent
56a2de04e1
commit
fa353d3a59
18
.github/workflows/clear-caches.yml
vendored
18
.github/workflows/clear-caches.yml
vendored
@ -1,6 +1,9 @@
|
|||||||
name: Clear cache
|
name: Clear cache
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
schedule:
|
||||||
|
# Run everyday at: https://crontab.guru/#0_6_*_*_*.
|
||||||
|
- cron: '0 6 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
@ -10,7 +13,7 @@ jobs:
|
|||||||
clear-cache:
|
clear-cache:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Clear cache
|
- name: Clear Firefox cache
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@v7
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
@ -20,12 +23,13 @@ jobs:
|
|||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
})
|
})
|
||||||
for (const cache of caches.data.actions_caches) {
|
for (const cache of caches.data.actions_caches) {
|
||||||
|
if (cache.key.toLowerCase().startsWith('firefox')) {
|
||||||
console.log(cache)
|
console.log(cache)
|
||||||
# Dry run
|
github.rest.actions.deleteActionsCacheById({
|
||||||
# github.rest.actions.deleteActionsCacheById({
|
owner: context.repo.owner,
|
||||||
# owner: context.repo.owner,
|
repo: context.repo.repo,
|
||||||
# repo: context.repo.repo,
|
cache_id: cache.id,
|
||||||
# cache_id: cache.id,
|
})
|
||||||
# })
|
}
|
||||||
}
|
}
|
||||||
console.log("Clear completed")
|
console.log("Clear completed")
|
||||||
|
Loading…
Reference in New Issue
Block a user