Browse Source

ci: add workflow runs clean up

Cat 1 year ago
parent
commit
611b03e539
1 changed files with 20 additions and 0 deletions
  1. 20 0
      .github/workflows/workflow_runs_clean_up.yml

+ 20 - 0
.github/workflows/workflow_runs_clean_up.yml

@@ -0,0 +1,20 @@
+name: Delete old workflow runs
+on:
+  workflow_dispatch:
+  schedule:
+    - cron: '0 0 * * *'
+
+jobs:
+  del_runs:
+    runs-on: ubuntu-latest
+    permissions:
+      actions: write
+      contents: read
+    steps:
+      - name: Delete workflow runs
+        uses: Mattraks/delete-workflow-runs@v2
+        with:
+          token: ${{ github.token }}
+          repository: ${{ github.repository }}
+          retain_days: 7
+          keep_minimum_runs: 1