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: