diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0dd339f..b3aba3d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,12 +18,15 @@ Build: - docker Push master: + image: docker:latest only: - master script: - docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA - docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA $CI_REGISTRY_IMAGE:latest - docker push $CI_REGISTRY_IMAGE:latest + services: + - docker:dind stage: push tags: - docker @@ -31,10 +34,13 @@ Push master: Push others: except: - master + image: docker:latest script: - docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA - docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME + services: + - docker:dind stage: push tags: - docker