.gitlab-ci.yml - added deploy to public registry

This commit is contained in:
Oscar Krause 2022-12-20 09:01:31 +01:00
parent 88e14d2a21
commit afa592e0ef

View File

@ -23,4 +23,8 @@ deploy:
rules: rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
script: script:
- echo "Nothing to do ..." - docker login -u $PUBLIC_REGISTRY_USER -p $PUBLIC_REGISTRY_TOKEN
- docker build . --tag $PUBLIC_REGISTRY_USER/${CI_PROJECT_PATH}:${CI_BUILD_REF}
- docker build . --tag $PUBLIC_REGISTRY_USER/${CI_PROJECT_PATH}:latest
- docker push $PUBLIC_REGISTRY_USER/${CI_PROJECT_PATH}:${CI_BUILD_REF}
- docker push $PUBLIC_REGISTRY_USER/${CI_PROJECT_PATH}:latest