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 a588048 commit f017f73Copy full SHA for f017f73
.github/workflows/clean-workflow-logs.yml
@@ -0,0 +1,28 @@
1
+name: Clean Workflow Logs
2
+
3
+on:
4
+ schedule:
5
+ - cron: "0 0 * * 2" # Runs "At 00:00 on Tuesday." (see https://crontab.guru)
6
7
+ workflow_dispatch:
8
+ inputs:
9
+ runs_older_than:
10
+ description: "The amount of days old to delete"
11
+ default: "21"
12
+ required: false
13
14
+env:
15
+ SCHEDULED_RUNS_OLDER_THAN: "21"
16
+ SCHEDULED_RUNS_TO_KEEP: "0"
17
18
+jobs:
19
+ clean-logs:
20
+ runs-on: ubuntu-latest
21
+ permissions:
22
+ actions: write
23
+ steps:
24
+ - uses: igorjs/gh-actions-clean-workflow@v6
25
+ with:
26
+ runs_older_than: ${{ github.event.inputs.runs_older_than || env.SCHEDULED_RUNS_OLDER_THAN }}
27
+ runs_to_keep: ${{ github.event.inputs.runs_to_keep || env.SCHEDULED_RUNS_TO_KEEP }}
28
0 commit comments