Skip to content

Commit 25881be

Browse files
committed
clean up workflows
1 parent 4c30e4b commit 25881be

File tree

2 files changed

+6
-51
lines changed

2 files changed

+6
-51
lines changed
Lines changed: 5 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,8 @@
11
name: Delete old workflow runs
22
on:
3-
workflow_dispatch:
4-
inputs:
5-
days:
6-
description: 'Days-worth of runs to keep for each workflow'
7-
required: true
8-
default: '30'
9-
minimum_runs:
10-
description: 'Minimum runs to keep for each workflow'
11-
required: true
12-
default: '6'
13-
delete_workflow_pattern:
14-
description: 'Name or filename of the workflow (if not set, all workflows are targeted)'
15-
required: false
16-
delete_workflow_by_state_pattern:
17-
description: 'Filter workflows by state: active, deleted, disabled_fork, disabled_inactivity, disabled_manually'
18-
required: true
19-
default: "ALL"
20-
type: choice
21-
options:
22-
- "ALL"
23-
- active
24-
- deleted
25-
- disabled_inactivity
26-
- disabled_manually
27-
delete_run_by_conclusion_pattern:
28-
description: 'Remove runs based on conclusion: action_required, cancelled, failure, skipped, success'
29-
required: true
30-
default: "ALL"
31-
type: choice
32-
options:
33-
- "ALL"
34-
- "Unsuccessful: action_required,cancelled,failure,skipped"
35-
- action_required
36-
- cancelled
37-
- failure
38-
- skipped
39-
- success
40-
dry_run:
41-
description: 'Logs simulated changes, no deletions are performed'
42-
required: false
3+
schedule:
4+
- cron: '0 0 1 * *'
5+
# Run monthly, at 00:00 on the 1st day of month.
436

447
jobs:
458
del_runs:
@@ -53,14 +16,5 @@ jobs:
5316
with:
5417
token: ${{ github.token }}
5518
repository: ${{ github.repository }}
56-
retain_days: ${{ github.event.inputs.days }}
57-
keep_minimum_runs: ${{ github.event.inputs.minimum_runs }}
58-
delete_workflow_pattern: ${{ github.event.inputs.delete_workflow_pattern }}
59-
delete_workflow_by_state_pattern: ${{ github.event.inputs.delete_workflow_by_state_pattern }}
60-
delete_run_by_conclusion_pattern: >-
61-
${{
62-
startsWith(github.event.inputs.delete_run_by_conclusion_pattern, 'Unsuccessful:')
63-
&& 'action_required,cancelled,failure,skipped'
64-
|| github.event.inputs.delete_run_by_conclusion_pattern
65-
}}
66-
dry_run: ${{ github.event.inputs.dry_run }}
19+
retain_days: 30
20+
keep_minimum_runs: 6

.github/workflows/reusable__deptrack-push-action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
name: 'Generate and push SBOM to Dependency Track'
12
on:
23
workflow_call:
34
inputs:

0 commit comments

Comments
 (0)