From 499c994f39b3b9f0755d1adeff1fe79b6ddb9a65 Mon Sep 17 00:00:00 2001 From: Zak Timson Date: Tue, 3 May 2022 16:08:22 +0000 Subject: [PATCH] Update .gitlab/.gitlab-ci.yml file --- .gitlab/.gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab/.gitlab-ci.yml b/.gitlab/.gitlab-ci.yml index d90c77b..a2cdb7b 100644 --- a/.gitlab/.gitlab-ci.yml +++ b/.gitlab/.gitlab-ci.yml @@ -60,7 +60,7 @@ registry: before_script: - docker login -u $CI_REGISTRY_USER -p $CI_JOB_TOKEN $CI_REGISTRY script: - - TAG=$(echo "$CI_COMMIT_BRANCH" | sed -E "s/[_/]/-/g") + - TAG=$([ "$CI_COMMIT_BRANCH" = "$CI_DEFAULT_BRANCH" ] && echo "latest" || echo "$CI_COMMIT_BRANCH" | sed -E "s/[_/]/-/g") - docker build --no-cache -t "$CI_REGISTRY_IMAGE:$TAG" . - docker push "$CI_REGISTRY_IMAGE:$TAG" rules: