Skip to content

Commit

Permalink
DBP-1179-allow-custom-image-name (#29)
Browse files Browse the repository at this point in the history
* allow custom image tag

* added explaining comment
  • Loading branch information
maxi418 authored Dec 16, 2024
1 parent 0cb188a commit c157bca
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/image-publish-trivy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# image_tag_generation: "ticket_from_branch" The ticket is extracted from the branch name (e.g. OPS-123-testing -> OPS-123)
# image_tag_generation: "commit_hash" Short hash of the commit is used as tag
# image_tag_generation: "version_git_tag" Git tag with version is used as tag
# image_tag_generation: "specified" The version specified with the image_tag input is used as tag
# 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)
# 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)
# add_latest_tag: true/false "latest" gets added as additiontal image tag
Expand Down Expand Up @@ -37,9 +38,13 @@ on:
type: boolean
default: false
image_tag_generation:
description: "Comma separated list of image tag generation strategies: ticket_from_branch, commit_hash, version_git_tag, mmp_git_tag or mm_git_tag"
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"
required: false
type: string
image_tag:
type: string
description: "Custom image tag (required if image_tag_generation: specified)"
required: false
context:
description: "Directory where the image is built, defaults to repository root"
required: false
Expand Down Expand Up @@ -123,6 +128,7 @@ jobs:
type=match,pattern=\d.\d,enable=${{ contains(inputs.image_tag_generation, 'mm_git_tag') }}
type=sha,enable=${{ contains(inputs.image_tag_generation, 'commit_hash') }}
type=pep440,pattern={{version}},enable=${{ contains(inputs.image_tag_generation, 'version_git_tag') }}
type=raw,value=${{ inputs.image_tag }},enable=${{ contains(inputs.image_tag_generation, 'specified') }}
flavor: |
latest=${{ inputs.add_latest_tag }}
Expand Down

0 comments on commit c157bca

Please sign in to comment.