Skip to content

Commit abcf88e

Browse files
committed
new clean.
1 parent 49616c8 commit abcf88e

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ on:
2222
pull_request:
2323
branches:
2424
- dev
25+
schedule:
26+
# Daily at 02:10 UTC.
27+
- cron: '10 2 * * *'
2528

2629

2730
jobs:

.github/workflows/clean_workflow_runs.yml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,36 @@ on:
1111
required: false
1212
default: 6
1313
schedule:
14-
# Sundays at 01:35 UTC.
15-
- cron: '35 1 * * 0'
14+
# Daily at 02:35 UTC.
15+
- cron: '35 2 * * *'
1616

1717
jobs:
1818
del_runs:
1919
runs-on: ubuntu-latest
2020
steps:
21+
- name: Check out code
22+
uses: actions/checkout@v3
2123
- name: Delete old workflow runs
2224
uses: Mattraks/delete-workflow-runs@v2
2325
with:
2426
token: ${{ github.token }}
2527
repository: ${{ github.repository }}
2628
retain_days: ${{ github.events.inputs.days }}
2729
keep_minimum_runs: ${{ github.events.inputs.keeps }}
30+
- name: Cleanup cache
31+
run: |
32+
gh extension install actions/gh-actions-cache
33+
34+
cacheBranches=$(gh actions-cache list | cut -f 1,3 | tr '\t' ':')
35+
36+
set +e
37+
echo "Deleting caches..."
38+
for key in $cacheBranches
39+
do
40+
key_line=(${key//;/ })
41+
echo "got <<${key_line[0]}>> <<${key_line[1]}>>"
42+
# gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm
43+
done
44+
echo "Done"
45+
env:
46+
GH_TOKEN: $

0 commit comments

Comments
 (0)