We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 87da6ea + ff5d574 commit 3b77437Copy full SHA for 3b77437
1 file changed
.github/workflows/prune-old-runs.yml
@@ -0,0 +1,27 @@
1
+name: Prune Old Workflow Runs & Artifacts
2
+
3
+on:
4
+ schedule:
5
+ - cron: "0 0 * * 0" # Runs every Sunday at midnight UTC
6
+ workflow_dispatch: # Allows manual execution
7
8
+jobs:
9
+ cleanup:
10
+ runs-on: ubuntu-latest
11
+ permissions:
12
+ actions: write
13
+ contents: read
14
+ steps:
15
+ - name: Delete workflow runs
16
+ uses: Mattraks/delete-workflow-runs@v2
17
+ with:
18
+ token: ${{ github.token }}
19
+ repository: ${{ github.repository }}
20
+ retain_days: 7
21
+ keep_minimum_runs: 1
22
23
+ - name: Delete old artifacts
24
+ uses: c-hive/gha-remove-artifacts@v1
25
26
+ age: "7 days"
27
+ skip-recent: 1
0 commit comments