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
|
||||
|
||||
on:
|
||||
schedule:
|
||||
# Run everyday at: https://crontab.guru/#0_6_*_*_*.
|
||||
- cron: '0 6 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
@ -10,7 +13,7 @@ jobs:
|
||||
clear-cache:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Clear cache
|
||||
- name: Clear Firefox cache
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
@ -20,12 +23,13 @@ jobs:
|
||||
repo: context.repo.repo,
|
||||
})
|
||||
for (const cache of caches.data.actions_caches) {
|
||||
if (cache.key.toLowerCase().startsWith('firefox')) {
|
||||
console.log(cache)
|
||||
# Dry run
|
||||
# github.rest.actions.deleteActionsCacheById({
|
||||
# owner: context.repo.owner,
|
||||
# repo: context.repo.repo,
|
||||
# cache_id: cache.id,
|
||||
# })
|
||||
github.rest.actions.deleteActionsCacheById({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
cache_id: cache.id,
|
||||
})
|
||||
}
|
||||
}
|
||||
console.log("Clear completed")
|
||||
|
Loading…
Reference in New Issue
Block a user