From 52d51fb36fe37bedd4a75834c09ec9ee766ff79e Mon Sep 17 00:00:00 2001 From: Kristian Amlie Date: Mon, 21 Mar 2022 11:10:35 +0100 Subject: [PATCH] Only publish Docker image on fresh tags or branch heads. This is to make sure we do not accidentally re-publish already existing tags. They can still be published manually by using the manual publish job, if necessary. Changelog: None Signed-off-by: Kristian Amlie --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 52a06b7..a8ce228 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -325,5 +325,5 @@ publish:docker-image:manual: publish:docker-image:automatic: rules: - - if: '$PUBLISH_MENDER_CONVERT_AUTOMATIC == "true"' + - if: '$CI_COMMIT_BRANCH =~ /^(master|staging|production|feature-.+|[0-9]+\.[0-9]+\.([0-9]+|x))$/' extends: .template:publish:docker-image