Skip to content

Commit 70e5886

Browse files
Simplify cleanup workflow by consolidating delete steps and removing redundant patterns
1 parent f042ad2 commit 70e5886

File tree

1 file changed

+2
-32
lines changed

1 file changed

+2
-32
lines changed

.github/workflows/cleanup.yml

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -25,40 +25,10 @@ jobs:
2525
actions: write
2626
contents: read
2727
steps:
28-
- name: Delete workflow runs (CI workflows)
28+
- name: Delete workflow runs
2929
uses: Mattraks/delete-workflow-runs@5bf9a1dac5c4d041c029f0a8370ddf0c5cb5aeb7 #v2.1
3030
with:
3131
token: ${{ github.token }}
3232
repository: ${{ github.repository }}
33-
delete_workflow_pattern: ci
34-
retain_days: ${{ github.event.inputs.retain-days || 2 }}
3533
keep_minimum_runs: ${{ github.event.inputs.minimum-runs || 2 }}
36-
check_pullrequest_exist: true
37-
38-
- name: Delete workflow runs (Release workflows)
39-
uses: Mattraks/delete-workflow-runs@5bf9a1dac5c4d041c029f0a8370ddf0c5cb5aeb7 #v2.1
40-
with:
41-
token: ${{ github.token }}
42-
repository: ${{ github.repository }}
43-
delete_workflow_pattern: release
44-
retain_days: ${{ github.event.inputs.retain-days || 2 }}
45-
keep_minimum_runs: ${{ github.event.inputs.minimum-runs || 2 }}
46-
check_pullrequest_exist: true
47-
48-
- name: Delete workflow runs (Scheduled cleanup runs)
49-
uses: Mattraks/delete-workflow-runs@5bf9a1dac5c4d041c029f0a8370ddf0c5cb5aeb7 #v2.1
50-
with:
51-
token: ${{ github.token }}
52-
repository: ${{ github.repository }}
53-
delete_workflow_pattern: cleanup
54-
retain_days: ${{ github.event.inputs.retain-days || 1 }}
55-
keep_minimum_runs: ${{ github.event.inputs.minimum-runs || 1 }}
56-
57-
- name: Delete workflow runs (Copilot code reviews)
58-
uses: Mattraks/delete-workflow-runs@5bf9a1dac5c4d041c029f0a8370ddf0c5cb5aeb7 #v2.1
59-
with:
60-
token: ${{ github.token }}
61-
repository: ${{ github.repository }}
62-
delete_workflow_pattern: copilot | Copilot
63-
retain_days: ${{ github.event.inputs.retain-days || 1 }}
64-
keep_minimum_runs: ${{ github.event.inputs.minimum-runs || 1 }}
34+
check_pullrequest_exist: true

0 commit comments

Comments
 (0)