From 803b922563390bc765ee35dbd6eaaa3a640588bf Mon Sep 17 00:00:00 2001
From: Alexander Wellbrock <a.wellbrock@mailbox.org>
Date: Thu, 10 Nov 2022 21:20:48 +0100
Subject: [PATCH] ci: remove only: config key, use rules: instead

---
 .gitlab-ci.yml | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c265b34c..c2d43366 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -55,14 +55,13 @@ deploy:
     - cp ./ci_known_hosts ~/.ssh/known_hosts && chmod 0600 ~/.ssh/known_hosts
   script:
     - ansible-playbook --vault-password-file=.vault_pass --private-key "$CI_PRIVATE_KEY_FILE" -i inventory -i inventory_ci "$PLAYBOOK"
-  only:
-    - main
   retry: 1
   resource_group: infrastructure
   rules:
     - if: $CI_DEPLOY == "0"
       when: never
     - if: $CI_DEPLOY == "1"
+    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
   tags:
     - infrastructure
 
-- 
GitLab