[neon/ubuntu-core/models.add-models-pipeline] debian: Image CI: Reword trigger rules

Antoine Gonzalez null at kde.org
Thu Aug 8 15:15:59 BST 2024


Git commit faad0fefe6e1afb17e5fd0c8b9cb1d012c1f5b75 by Antoine Gonzalez.
Committed on 08/08/2024 at 14:15.
Pushed by daspood into branch 'models.add-models-pipeline'.

Image CI: Reword trigger rules

M  +4    -4    debian/neon-core-image-dangerous.yml
M  +1    -1    debian/neon-core-image-signed.yml

https://invent.kde.org/neon/ubuntu-core/-/commit/faad0fefe6e1afb17e5fd0c8b9cb1d012c1f5b75

diff --git a/debian/neon-core-image-dangerous.yml b/debian/neon-core-image-dangerous.yml
index 73c0fe9..5565e6f 100644
--- a/debian/neon-core-image-dangerous.yml
+++ b/debian/neon-core-image-dangerous.yml
@@ -1,11 +1,11 @@
 neon_core_image_dangerous:
   rules:
-    # Only build the image on master
-    - if: '$CI_COMMIT_BRANCH == master'
-      when: always
-    # Allow manually triggering the job on `models.*` branches
+    # Allow manual trigger on `models.*` branches
     - if: '$CI_COMMIT_BRANCH =~ /models\..*/'
       when: manual
+    # Otherwise, only build the image on master
+    - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
+      when: always
     # Only let it run if the required variables are present
     # These are normally defined on protected branches on our normal repository but we do the logic this way to allow someone else to set this up in their fork if they want
     - if: '$SNAPCRAFT_STORE_CREDENTIALS == null || $SNAP_GPG_PRIVATE_KEY == null || $SNAP_GPG_OWNER_TRUST == null'
diff --git a/debian/neon-core-image-signed.yml b/debian/neon-core-image-signed.yml
index 3bbf338..b2a28f3 100644
--- a/debian/neon-core-image-signed.yml
+++ b/debian/neon-core-image-signed.yml
@@ -1,7 +1,7 @@
 neon_core_image_signed:
   rules:
     # Only build the image on master
-    - if: '$CI_COMMIT_BRANCH == master'
+    - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
       when: always
     # Only let it run if the required variables are present
     # These are normally defined on protected branches on our normal repository but we do the logic this way to allow someone else to set this up in their fork if they want


More information about the Neon-commits mailing list