-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
98 lines (82 loc) · 2.7 KB
/
action.yml
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: "Github Maintenance Action"
description: "Executing maintenance tasks on Github."
author: "Viascom Ltd liab. Co | Nikola Stanković <[email protected]>"
inputs:
github_token:
description: "Authentication token"
required: true
default: ${{ github.token }}
github_base_url:
description: "Base API URL"
required: false
default: "https://api.github.com"
repository:
description: "Name of the repository."
required: true
default: ${{ github.repository }}
retention_days:
description: "Retention time in days of runs to keep."
required: true
default: 31
keep_minimum_runs:
description: "Minimum workflow runs to keep."
required: true
default: 5
delete_logs:
description: "Deletes only the logs of the workflow runs."
required: false
default: false
delete_artifacts:
description: "Deletes only the artifacts of the workflow runs."
required: false
default: false
actors:
description: "Comma-separated list of actors of the workflow runs to be deleted."
required: false
default: ""
branches:
description: "Comma-separated list of branches of the workflow runs to be deleted."
required: false
default: ""
events:
description: "Comma-separated list of events of the workflow runs to be deleted."
required: false
default: ""
statuses:
description: "Comma-separated list of statuses of the workflow runs to be deleted."
required: false
default: ""
keep_pull_requests:
description: "If set to true, it will keep pull request workflow runs."
required: false
default: false
dry_run:
description: "Logs simulated changes, no actions are performed!"
required: false
default: false
debug:
description: "When debug is enabled more logs will be printed."
required: false
default: false
runs:
using: "docker"
image: "docker://ghcr.io/viascom/github-maintenance-action:0.0.1"
args:
- /etc/run_application.sh
- ${{ inputs.github_token }}
- ${{ inputs.github_base_url }}
- ${{ inputs.repository }}
- ${{ inputs.retention_days }}
- ${{ inputs.keep_minimum_runs }}
- ${{ inputs.delete_logs }}
- ${{ inputs.delete_artifacts }}
- ${{ inputs.actors }}
- ${{ inputs.branches }}
- ${{ inputs.events }}
- ${{ inputs.statuses }}
- ${{ inputs.keep_pull_requests }}
- ${{ inputs.dry_run }}
- ${{ inputs.debug }}
branding:
icon: "settings" # https://feathericons.com/ - https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#brandingicon
color: "purple" # The background color of the badge. Can be one of: white, yellow, blue, green, orange, red, purple, or gray-dark.