Skip to content

Commit

Permalink
ci: fix adding GIT_HASH as a tag to the alternative image
Browse files Browse the repository at this point in the history
  • Loading branch information
rimelek committed Jul 17, 2022
1 parent 2936944 commit 4942168
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions ci/resources.sh
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,10 @@ function deployCommandGen() (
shift $((OPTIND - 1))

function tag() {
echo "docker tag \"$IMAGE_NAME:$IMAGE_TAG\" \"$IMAGE_NAME:$1\""
if [[ "$IMAGE_TAG" != "$1" ]]; then
echo "docker tag \"$IMAGE_NAME:$IMAGE_TAG\" \"$IMAGE_NAME:$1\""
fi

if [[ "${IMAGE_NAME_ALTERNATIVE+x}" == "x" ]] && [[ -n "$IMAGE_NAME_ALTERNATIVE" ]]; then
echo "docker tag \"$IMAGE_NAME:$IMAGE_TAG\" \"$IMAGE_NAME_ALTERNATIVE:$1\""
fi
Expand All @@ -212,9 +215,7 @@ function deployCommandGen() (
fi
}
function pushAs() {
if [[ "$IMAGE_TAG" != "$1" ]]; then
tag "$1"
fi
tag "$1"
push "$1"
}

Expand Down

0 comments on commit 4942168

Please sign in to comment.