diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c21556ee15ddf4008257e90340958b25a152c69b..2c71924cb490b4574589297ccc8709492cea8223 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,8 +8,8 @@ variables: services: - docker:20.10.16-dind script: - - "docker pull $CI_REGISTRY_IMAGE:$IMAGE_TAG || true" - - "docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY" + - "docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY" + - "docker pull $CI_REGISTRY_IMAGE:$IMAGE_TAG" - "docker build --cache-from $CI_REGISTRY_IMAGE:$IMAGE_TAG -t $CI_REGISTRY_IMAGE:$IMAGE_TAG -f $DOCKERFILE ." - "docker push $CI_REGISTRY_IMAGE:$IMAGE_TAG" - 'if [ "${CI_COMMIT_REF_NAME}" = master ] ; then docker tag $CI_REGISTRY_IMAGE:$IMAGE_TAG $CI_REGISTRY_IMAGE:$IMAGE_TAG_RELEASE && docker push $CI_REGISTRY_IMAGE:$IMAGE_TAG_RELEASE ; fi'