# Push the image to the GitLab registry only if the pipeline was triggered by a tag
-|
if [ ! -z ${CI_COMMIT_TAG} ]; then
echo "Push the image to the GitLab registry only if the pipeline was triggered by a tag; if no tag shell error is fully expected here and the reported success of the job is really what is intended."
if [ -z ${CI_COMMIT_TAG+x} ] ; then
docker tag ${NAME} $CI_REGISTRY/$CI_PROJECT_PATH/${NAME}:latest