From fecd899e8189072eea62f15f18ed2fcb7661b881 Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Sat, 4 Sep 2021 15:51:07 -1000 Subject: [PATCH] docker: deploy only manually and on master/tags 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 --- .gitlab/docker.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitlab/docker.yml b/.gitlab/docker.yml index 4c4fc8f..9140432 100644 --- a/.gitlab/docker.yml +++ b/.gitlab/docker.yml @@ -23,6 +23,10 @@ .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 -- 2.30.2