Commit a97da729 authored by Adam Mercer's avatar Adam Mercer

logout after push to private registry

parent f3137bee
......@@ -13,10 +13,10 @@ docker:build:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker build --pull -t $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME .
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
- docker logout $CI_REGISTRY
- |
# push to docker hub
if [[ $CI_PROJECT_NAMESPACE == 'docker' ]]; then
docker logout $CI_REGISTRY
docker login -u $DOCKER_HUB_USER -p $DOCKER_HUB_TOKEN
docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME $REPOSITORY:$CI_COMMIT_REF_NAME
docker push $REPOSITORY:$CI_COMMIT_REF_NAME
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment