Skip to content

Commit 057bf90

Browse files
committed
Added extra logic for resolving #323
1 parent 159efac commit 057bf90

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

.github/workflows/service_docker-build-and-publish.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ jobs:
113113
DOCKER_REGISTRY_REPOSITORIES: ${{ inputs.registry-repositories }}
114114
RELEASE_TYPE: ${{ inputs.release-type }}
115115
GITHUB_RELEASE_TAG: ${{ github.ref }}
116+
GITHUB_REF_TYPE: ${{ github.ref_type }}
116117

117118
- name: Set REPOSITORY_BUILD_VERSION
118119
id: set_version

scripts/assemble-docker-tags.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ add_docker_tag() {
105105
# Trim commas for a better output
106106
echo_color_message blue "🐳 Set tag: ${tag_name//,} "
107107

108-
if [[ -n "$GITHUB_RELEASE_TAG" ]]; then
108+
if [[ -n "$GITHUB_RELEASE_TAG" && "$GITHUB_REF_TYPE" == "tag" ]]; then
109109
DOCKER_TAGS+=",$tag_name-$GITHUB_RELEASE_TAG"
110110
echo_color_message blue "🐳 Set tag: ${tag_name//,}-$GITHUB_RELEASE_TAG"
111111
fi
@@ -181,6 +181,7 @@ while [[ $# -gt 0 ]]; do
181181
shift 2
182182
;;
183183
--github-release-tag)
184+
GITHUB_REF_TYPE="tag"
184185
GITHUB_RELEASE_TAG="$2"
185186
shift 2
186187
;;

0 commit comments

Comments
 (0)