forked from snok/container-retention-policy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
66 lines (66 loc) · 2.48 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
name: 'Container Retention Policy'
description: 'Create a retention policy for your GHCR hosted container images'
branding:
icon: "book"
color: "blue"
inputs:
account-type:
description: "The type of account. Can be either 'org' or 'personal'."
required: true
org-name:
description: "The name of the organization. Only required if the account type is 'personal'."
default: ''
required: false
image-names:
description: 'Image name to delete. Supports passing several names as a comma-separated list.'
required: true
timestamp-to-use:
description: 'Whether to use updated_at or created_at timestamps. Defaults to updated_at.'
required: true
default: 'updated_at'
cut-off:
description: "The cut-off for which to delete images older than. For example '2 days ago UTC'. Timezone is required."
required: true
token:
description: 'Personal access token with read and delete scopes.'
required: true
untagged-only:
description: 'Restrict deletions to images without tags.'
required: false
default: 'false'
skip-tags:
description: "Restrict deletions to images without specific tags. Supports Unix-shell style wildcards"
required: false
keep-at-least:
description: 'How many images to keep no matter what. Defaults to 0 which means you might delete everything'
required: false
default: '0'
filter-tags:
description: "Comma-separated list of tags to consider for deletion. Supports Unix-shell style wildcards"
required: false
filter-include-untagged:
description: "Whether to consider untagged images for deletion."
required: false
default: 'true'
outputs:
needs-github-assistance:
description: 'Comma-separated list of image names and tags, for image versions that are public and have more than 5000 downloads.'
deleted:
description: 'Comma-separated list of image names and tags, for image versions that were deleted during the run.'
failed:
description: 'Comma-separated list of image names and tags, for image versions that we failed to delete during the run, for an unknown reason.'
runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{ inputs.account-type }}
- ${{ inputs.org-name }}
- ${{ inputs.image-names }}
- ${{ inputs.timestamp-to-use }}
- ${{ inputs.cut-off }}
- ${{ inputs.token }}
- ${{ inputs.untagged-only }}
- ${{ inputs.skip-tags }}
- ${{ inputs.keep-at-least }}
- ${{ inputs.filter-tags }}
- ${{ inputs.filter-include-untagged }}