-
Notifications
You must be signed in to change notification settings - Fork 1
/
action.yml
63 lines (62 loc) · 2.18 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
name: 'ACR Container Purge'
description: 'Purge containers from your the Azure Container Registry'
author: 'Plabick'
branding:
icon: 'trash-2'
color: 'orange'
inputs:
registry:
description: 'The name of the Azure Container Registry to purge. Case insensitive i.e exampleazureregistry'
required: true
username:
description: 'Azure Service Principal Username'
required: true
tenant:
description: 'Azure Service Principal Tenant'
required: true
password:
description: 'Azure Service Principal Tennant ID'
required: true
repo:
description: 'The ACR repository to purge containers from. Leave blank to purge from all repositories'
required: false
default: 'all'
tag-regex:
description: 'Only purge containers with tags matching this regex. Leave blank to purge containers with any tag'
required: false
default: '.*'
repo-regex:
description: 'Only purge containers from ACR repositories matching this regex. Only applicable if `repo` input is unset. Leave blank to purge containers from all repositories'
required: false
default: '.*'
days-to-keep:
description: 'Do not purge any containers younger than this'
default: '7'
keep:
description: 'Save this many containers from being purged that otherwise meet all other purge rules'
required: false
default: '10'
dry-run:
description: "Specifies that no data is deleted, but the output is the same as if the command is run without this flag. This parameter is useful for testing a purge command to make sure it does not inadvertently delete data you intend to preserve"
required: false
default: false
delete-untagged:
description: "Specifies that manifests that don't have associated tags (untagged manifests) are deleted."
required: false
default: false
runs:
using: 'docker'
image: 'Dockerfile'
env:
DRYRUN: ${{ inputs.dry-run }}
UNTAGGED: ${{ inputs.delete-untagged }}
args:
- ${{ inputs.registry }}
- ${{ inputs.username }}
- ${{ inputs.tenant }}
- ${{ inputs.password }}
- ${{ inputs.repo }}
- ${{ inputs.tag-regex }}
- ${{ inputs.repo-regex }}
- ${{ inputs.days-to-keep }}
- ${{ inputs.keep }}