-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathaction.yml
59 lines (52 loc) · 2.04 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
# Reference: https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions
---
author: Simon Li
name: major-minor-tag-calculator
description: Calculate major and minor semver tags, e.g. for tagging containers
# Manually keep the input-, and output- descriptions in sync with the readme!
inputs:
githubToken:
required: false
description: |-
The GitHub token, required so this action can fetch tags using the GitHub API. If this parameter is not set then `defaultTag` (if set) or an empty list will be returned.
default: ""
prefix:
required: false
description: |-
One or more whitespace or comma delimited prefixes for returned tags.
As an example, prefix could be set to `ghcr.io/a/b: quay.io/a/b:` to
provide image names with tags for two separate repositories.
The string `""` can be used to represent an empty string, and
all combinations of prefixes and suffixes are used.
default: ""
suffix:
required: false
description: |-
One or more whitespace or comma delimited suffixes for returned tags.
As an example, suffix could be set to `"" -debian` to provide
a default image variant without suffix next to an image variant referred
to with a -debian suffix.
The string `""` can be used to represent an empty string, and
all combinations of prefixes and suffixes are used.
default: ""
defaultTag:
required: false
description: |-
If the tag output would be empty return this tag instead.
This can be useful for running a workflow in pull requests where no suitable git references are present.
`prefix` or `suffix` are _not_ automatically added.
default: ""
branchRegex:
required: false
description: |-
If a branch name does not match this regex return `defaultTag` or empty instead.
default: "^[a-zA-Z0-9_][a-zA-Z0-9._-]{0,127}$"
outputs:
tags:
description: A JSON formatted list of calculated tags.
runs:
using: node20
main: dist/index.js
branding:
icon: bookmark
color: purple