Update .gitlab/.gitlab-ci.yml file

This commit is contained in:
Zakary Timson 2022-05-03 16:08:22 +00:00
parent 5763542a04
commit 499c994f39

View File

@ -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: