-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (36 loc) · 1.26 KB
/
Copy pathclean-workflow.yaml
File metadata and controls
40 lines (36 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
---
name: Clean - Workflow
on: # yamllint disable-line rule:truthy
schedule:
- cron: "0 6 * * 1" # UTC
workflow_dispatch:
jobs:
clean-workflow:
runs-on: ubuntu-latest
permissions:
contents: read # Required to read repository data
actions: write # Required to modify workflows
steps:
- name: Delete skipped
uses: Mattraks/delete-workflow-runs@b3018382ca039b53d238908238bd35d1fb14f8ee # v2.1.0
with:
token: ${{ github.token }}
repository: ${{ github.repository }}
retain_days: 0
keep_minimum_runs: 0
delete_run_by_conclusion_pattern: skipped
- name: Delete cancelled
uses: Mattraks/delete-workflow-runs@b3018382ca039b53d238908238bd35d1fb14f8ee # v2.1.0
with:
token: ${{ github.token }}
repository: ${{ github.repository }}
retain_days: 0
keep_minimum_runs: 0
delete_run_by_conclusion_pattern: cancelled
- name: Delete workflow runs (older than a week)
uses: Mattraks/delete-workflow-runs@b3018382ca039b53d238908238bd35d1fb14f8ee # v2.1.0
with:
token: ${{ github.token }}
repository: ${{ github.repository }}
retain_days: 7
keep_minimum_runs: 1