|
6 | 6 | # image_tag_generation: "ticket_from_branch" The ticket is extracted from the branch name (e.g. OPS-123-testing -> OPS-123)
|
7 | 7 | # image_tag_generation: "commit_hash" Short hash of the commit is used as tag
|
8 | 8 | # image_tag_generation: "version_git_tag" Git tag with version is used as tag
|
| 9 | +# image_tag_generation: "specified" The version specified with the image_tag input is used as tag |
9 | 10 | # image_tag_generation: "mmp_git_tag" The tag is derived from git tag with pattern "\d.\d.\d" as mayor.minor.patch version (e.g. infra-tools-1.3.6 -> 1.3.6)
|
10 | 11 | # image_tag_generation: "mm_git_tag" The tag is derived from git tag with pattern "\d.\d" as mayor.minor version (e.g. infra-tools-1.3.6 -> 1.3)
|
11 | 12 | # add_latest_tag: true/false "latest" gets added as additiontal image tag
|
|
37 | 38 | type: boolean
|
38 | 39 | default: false
|
39 | 40 | image_tag_generation:
|
40 |
| - description: "Comma separated list of image tag generation strategies: ticket_from_branch, commit_hash, version_git_tag, mmp_git_tag or mm_git_tag" |
| 41 | + description: "Comma separated list of image tag generation strategies: ticket_from_branch, commit_hash, version_git_tag, specified, mmp_git_tag or mm_git_tag" |
41 | 42 | required: false
|
42 | 43 | type: string
|
| 44 | + image_tag: |
| 45 | + type: string |
| 46 | + description: "Custom image tag (required if image_tag_generation: specified)" |
| 47 | + required: false |
43 | 48 | context:
|
44 | 49 | description: "Directory where the image is built, defaults to repository root"
|
45 | 50 | required: false
|
@@ -123,6 +128,7 @@ jobs:
|
123 | 128 | type=match,pattern=\d.\d,enable=${{ contains(inputs.image_tag_generation, 'mm_git_tag') }}
|
124 | 129 | type=sha,enable=${{ contains(inputs.image_tag_generation, 'commit_hash') }}
|
125 | 130 | type=pep440,pattern={{version}},enable=${{ contains(inputs.image_tag_generation, 'version_git_tag') }}
|
| 131 | + type=raw,value=${{ inputs.image_tag }},enable=${{ contains(inputs.image_tag_generation, 'specified') }} |
126 | 132 | flavor: |
|
127 | 133 | latest=${{ inputs.add_latest_tag }}
|
128 | 134 |
|
|
0 commit comments