From fc4e565d6ecdc3913d2e6e5b9661440029f68e67 Mon Sep 17 00:00:00 2001
From: Maarten de Waard <maarten@greenhost.nl>
Date: Mon, 1 Nov 2021 13:17:12 +0100
Subject: [PATCH] do not delete master tag

TRIGGER_JOBS=ci-test-image-build
---
 .gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 8773c0896..63f697610 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -711,7 +711,7 @@ terminate-droplet:
     # Delete droplet
     - python3 -c "import greenhost_cloud; greenhost_cloud.terminate_droplets_by_name(\"^${CI_COMMIT_REF_SLUG}\")"
     # Delete container if one was created
-    - "if [ ! -z \"$CI_CONTAINER_TAG\" ]; then curl --request DELETE --header \"PRIVATE-TOKEN: ${CLEANER_TOKEN}\" https://open.greenhost.net/api/v4/projects/openappstack%2Fopenappstack/registry/repositories/2/tags/${CI_CONTAINER_TAG}; fi"
+    - "if [ \"$CI_CONTAINER_TAG\" != \"master\" ]; then curl --request DELETE --header \"PRIVATE-TOKEN: ${CLEANER_TOKEN}\" https://open.greenhost.net/api/v4/projects/openappstack%2Fopenappstack/registry/repositories/2/tags/${CI_CONTAINER_TAG}; fi"
   environment:
     name: $CI_COMMIT_REF_SLUG
     action: stop
-- 
GitLab