diff --git a/templates/gitlab-ci-docker.yml b/templates/gitlab-ci-docker.yml
index 07266a52381160e5f3fb95b76d8368bdad7adf90..d38eff35acb167dc39783a109e0332b26b9bfa1b 100644
--- a/templates/gitlab-ci-docker.yml
+++ b/templates/gitlab-ci-docker.yml
@@ -843,7 +843,7 @@ docker-publish:
           log_warn "[semantic-release] no new version to release: skip"
           exit 0
         else
-          DOCKER_RELEASE_IMAGE=$(echo "$DOCKER_RELEASE_IMAGE" | sed "s/\(:.*\)\{0,1\}$/:$SEMREL_INFO_NEXT_VERSION/")
+          DOCKER_RELEASE_IMAGE="${DOCKER_RELEASE_IMAGE%:*}:$SEMREL_INFO_NEXT_VERSION"
           log_info "[semantic-release] new Image tag is set: $DOCKER_RELEASE_IMAGE"
         fi
       fi