]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
ci: Only run the Flatpak jobs if there's REPO_TOKEN set in the repo
authorJordan Petridis <jordan@centricular.com>
Tue, 6 Jun 2023 12:45:24 +0000 (15:45 +0300)
committerJordan Petridis <jordan@centricular.com>
Tue, 6 Jun 2023 12:48:45 +0000 (15:48 +0300)
REPO_TOKEN is the authentication token to publish to the Nightly
flatpak repository.

And overwrite the publish_nightly rules again, since we need
to append them to only run on schedules.

.gitlab-ci.yml

index f3542f980257bca36e16571532f0cb1ee5874b25..35e3426fa77a949e0a2cf097c0230084ab813ec7 100644 (file)
@@ -2,7 +2,7 @@ include: "https://gitlab.gnome.org/GNOME/citemplates/raw/master/flatpak/flatpak_
 
 .flatpak rules:
   rules:
-    - if: $CI_PIPELINE_SOURCE == "web" || $CI_PIPELINE_SOURCE == "schedule"
+    - if: $CI_COMMIT_BRANCH == "main" && $REPO_TOKEN && ($CI_PIPELINE_SOURCE == "web" || $CI_PIPELINE_SOURCE == "schedule")
 
 .vars-extension:
   extends: ".flatpak rules"
@@ -21,9 +21,9 @@ flatpak-extension@aarch64:
   extends: [".flatpak@aarch64", ".vars-extension"]
 
 nightly@x86_64:
-  extends: ['.publish_nightly']
+  extends: ['.publish_nightly', ".flatpak rules"]
   needs: ['flatpak-extension@x86_64']
 
 nightly@aarch64:
-  extends: ['.publish_nightly']
+  extends: ['.publish_nightly', ".flatpak rules"]
   needs: ['flatpak-extension@aarch64']