From a560cecf1c178691fc3838baafe07b496efa221d Mon Sep 17 00:00:00 2001 From: yrzr Date: Thu, 23 Jul 2020 09:35:41 +0800 Subject: [PATCH] update latest tag --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9a8e666..96e243b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -54,7 +54,7 @@ build: - sed -i 's/less/less libatomic1/' ./Dockerfile - docker build -q -t ${DOCKER_NS}/${BASENAME}:${CI_COMMIT_TAG}-ce.0 -f ./Dockerfile ./ # latest tag - - cd ../ && git fetch --tags && LATEST=$(git tag | sort -rV | head -n 1) + - cd ../../ && git fetch --tags && LATEST=$(git tag | sort -rV | head -n 1) - if [ "${LATEST}" == "${CI_COMMIT_TAG}" ]; then docker tag ${DOCKER_NS}/${BASENAME}:${CI_COMMIT_TAG}-ce.0 ${DOCKER_NS}/${BASENAME}:latest; fi # docker push - docker login --username ${DOCKER_USERNAME} --password ${DOCKER_PASSWORD}