-
Notifications
You must be signed in to change notification settings - Fork 5
/
action.yml
136 lines (110 loc) · 3.69 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
name: Ghcr.io Cleanup Action
description: >
Delete untagged/tagged images from the GitHub Container Registry. Supports
multi-architecture and attestation images.
author: Dataaxiom Inc
branding:
icon: trash-2
color: green
inputs:
# General Options
token:
description: >
Token to authenticate with the ghcr.io registry and the GitHub API
required: true
owner:
description: >
Owner of the package (user or organization). Defaults to project owner
required: false
repository:
description: >
The GitHub repository where the package is stored. Defaults to repository
name
required: false
package:
description: >
Comma-separated list of packages to cleanup. Support dynamic packages
(wildcard or regular expression) by enabling the expand-packages option.
required: false
packages:
description: >
Alternative name for package option
required: false
expand-packages:
description: >
Enable wildcard or regular expression support on the package(s) option to
support dynamic package selection. Requires use of a Personal Access Token
(PAT) for the token value.
required: false
# Cleanup Options
delete-tags:
description: >
Comma-separated list of tags to delete (supports wildcard syntax), can be
abbreviated as `tags`. A regular expression selector can be used instead
by setting the `use-regex` option to true
required: false
tags:
description: >
Short form of `delete-tags` input option
required: false
exclude-tags:
description: >
Comma-separated list of tags strictly to be preserved/excluded from
deletion (supports wildcard syntax). A regular expression selector can be
used instead by setting the `use-regex` option to true
required: false
keep-n-untagged:
description: >
Number of untagged images to keep (sorted by date, keeping newest)
required: false
keep-n-tagged:
description: >
Number of tagged images to keep (sorted by date, keeping newest)
required: false
delete-untagged:
description: >
Delete all untagged images. This option is set to true when no other
delete or keep options are set (true/false)
required: false
delete-ghost-images:
description: >
Delete multi architecture images where all underlying platform images are
missing (true/false) Default: false
required: false
delete-partial-images:
description: >
Delete multi architecture images where some (but not all) underlying
platform images are missing (true/false) Default: false
required: false
delete-orphaned-images:
description: >
Delete orphaned images (referrers/cosign etc) where the parent image
doesn't exist. Uses a tagged based check.
required: false
older-than:
description: >
Only include packages for processing that are older than this value. Use
the following format samples: 50 seconds, 15 days, 6 months, 2 years
required: false
# Additional Options
use-regex:
description: >
Use a regex expression in place of wildcard matcher for package,
delete-tags and exclude-tags options (true/false) Default: false
required: false
validate:
description: >
Validate all multi-architecture images manifests by checking their digests
are present in the registry (true/false) Default: false
required: false
dry-run:
description: >
Simulate action - does not remove any packages (true/false) Default: false
required: false
log-level:
description: >
Log level (error/warn/info/debug) Default: info
required: false
runs:
using: node20
main: dist/index.js