We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d466c26 commit 35679e2Copy full SHA for 35679e2
.github/workflows/clean_cache.yml
@@ -0,0 +1,33 @@
1
+name: Clear cache
2
+
3
+on:
4
+ schedule:
5
+ # Monthly day 1 at 0:35 UTC.
6
+ - cron: '35 0 1 1-12 *'
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
29
30
+ cache_id: cache.id,
31
32
+ }
33
+ console.log("Clear completed")
0 commit comments