Unmerged branches shouldn't be deployed as "latest" image, only tags and
`master` branches should.
It is still possible to use containers from tested branches since they
are uploaded to the container registry using their *commit slug*.
Signed-off-by: Paul Spooren <mail@aparcar.org>
.deploy Docker image:
extends: .docker in docker
+ only:
+ - master
+ - tags
+ when: manual
script:
- export IMAGE_NAME="$(echo $CI_JOB_NAME | sed 's/deploy Docker image \(.*\)/\1/')"
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY