gitlab CI: fail the sanity check stage if the fork is not public
authorPeter Hutterer <peter.hutterer@who-t.net>
Thu, 24 Feb 2022 00:12:00 +0000 (10:12 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Thu, 24 Feb 2022 00:21:53 +0000 (10:21 +1000)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
.gitlab-ci.yml
.gitlab-ci/ci.template

index 2d31848..4e2be54 100644 (file)
@@ -146,6 +146,20 @@ variables:
 #                                                               #
 #################################################################
 
+fail-if-fork-is-not-public:
+  stage: sanity check
+  script:
+    - |
+      if [ $CI_PROJECT_VISIBILITY != "public" ]; then
+           echo "*************************************************************************************"
+           echo "Project visibility must be set to 'public'"
+           echo "Change this in $CI_PROJECT_URL/edit under 'Visibility, project features, permissions'"
+           echo "*************************************************************************************"
+           exit 1
+      fi
+  except:
+    - main@libinput/libinput
+
 # Re-generate the CI script and make sure it's the one currently checked in
 # If this job fails, re-generate the gitlab-ci.yml script, see
 # $SRCDIR/.gitlab-ci/generate-gitlab-ci.py
index 640de80..9839d6d 100644 (file)
@@ -127,6 +127,20 @@ variables:
 #                                                               #
 #################################################################
 
+fail-if-fork-is-not-public:
+  stage: sanity check
+  script:
+    - |
+      if [ $CI_PROJECT_VISIBILITY != "public" ]; then
+           echo "*************************************************************************************"
+           echo "Project visibility must be set to 'public'"
+           echo "Change this in $CI_PROJECT_URL/edit under 'Visibility, project features, permissions'"
+           echo "*************************************************************************************"
+           exit 1
+      fi
+  except:
+    - main@libinput/libinput
+
 # Re-generate the CI script and make sure it's the one currently checked in
 # If this job fails, re-generate the gitlab-ci.yml script, see
 # $SRCDIR/.gitlab-ci/generate-gitlab-ci.py