File tree Expand file tree Collapse file tree 2 files changed +35
-0
lines changed
Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+
2+ name : Clear cache
3+
4+ on :
5+ schedule :
6+ - cron : ' 0 0 1 * *'
7+ workflow_dispatch :
8+
9+ permissions :
10+ actions : write
11+
12+ jobs :
13+ clear-cache :
14+ runs-on : ubuntu-latest
15+ steps :
16+ - name : Clear cache
17+ uses : actions/github-script@v6
18+ with :
19+ script : |
20+ console.log("About to clear")
21+ const caches = await github.rest.actions.getActionsCacheList({
22+ owner: context.repo.owner,
23+ repo: context.repo.repo,
24+ })
25+ for (const cache of caches.data.actions_caches) {
26+ console.log(cache)
27+ github.rest.actions.deleteActionsCacheById({
28+ owner: context.repo.owner,
29+ repo: context.repo.repo,
30+ cache_id: cache.id,
31+ })
32+ }
33+ console.log("Clear completed")
Original file line number Diff line number Diff line change 1515 uses : actions/checkout@v3
1616 - name : π Set up Python ${{ matrix.python-version }}
1717 uses : actions/setup-python@v4
18+ # Β id based on python version
19+ id : python-setup
1820 with :
1921 python-version : ${{ matrix.python-version }}
2022 check-latest : true
You canβt perform that action at this time.
0 commit comments