diff --git a/latest-tag.sh b/latest-tag.sh new file mode 100755 index 0000000..bda1c5d --- /dev/null +++ b/latest-tag.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +LATEST=$(git tag | sort -rV | head -n 1) + +if [ "${LATEST}" == "${CI_COMMIT_TAG}" ]; then + docker tag ${DOCKER_NS}/${BASENAME}:${CI_COMMIT_TAG} ${DOCKER_NS}/${BASENAME}:latest; +fi