forked from Mattraks/delete-workflow-runs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yaml
64 lines (51 loc) · 1.82 KB
/
action.yaml
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: 'Delete workflow runs'
description: 'An action to delete workflow runs in a repository.'
author: 'Mattraks'
inputs:
token:
description: 'Authentication token'
required: true
default: ${{ github.token }}
baseUrl:
description: 'Base API URL'
required: false
default: "https://api.github.com"
repository:
description: 'Name of the repository'
required: true
default: ${{ github.repository }}
retain_days:
description: 'Days-worth of runs to keep for each workflow'
required: true
default: 30
keep_minimum_runs:
description: 'Minimum runs to keep for each workflow'
required: true
default: 6
delete_workflow_pattern:
description: 'Name or filename of the workflow (if not set, all workflows are targeted)'
required: false
delete_workflow_by_state_pattern:
description: 'Filter workflows by state: active, deleted, disabled_fork, disabled_inactivity, disabled_manually'
required: false
delete_run_by_conclusion_pattern:
description: 'Remove runs based on conclusion: action_required, cancelled, failure, skipped, success'
required: false
dry_run:
description: 'Logs simulated changes, no deletions are performed'
required: false
check_branch_existence:
description: 'If the workflow was triggered by a branch, the branch must be deleted before the workflow run is deleted as well.'
required: false
check_pullrequest_exist:
description: "If the run is linked to a pull request, the deletion is skipped."
required: false
runs:
# with node16, I got this error:
# fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}).
# Learn more at https://github.com/octokit/octokit.js/#fetch-missing
using: 'node20'
main: 'dist/index.js'
branding:
icon: 'delete'
color: 'red'