From 0e2df4c9ac59a10080bd6e029e83a355ecd01c8b Mon Sep 17 00:00:00 2001
From: Bryan Richter <bryan@haskell.foundation>
Date: Tue, 9 May 2023 09:46:36 +0300
Subject: [PATCH] Fix up rules for ghcup-metadata-nightly-push

---
 .gitlab-ci.yml | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 8b655e0a0d9b..2a8cab71cd0c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1048,7 +1048,7 @@ ghcup-metadata-nightly:
   rules:
     - if: $NIGHTLY
 
-# Update the
+# Update the ghcup metadata with information about this nightly pipeline
 ghcup-metadata-nightly-push:
   stage: deploy
   image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora33:$DOCKER_REV"
@@ -1072,11 +1072,8 @@ ghcup-metadata-nightly-push:
     - git commit -m "Update metadata"
     - git push gitlab_origin HEAD:updates -o ci.skip
   rules:
-    - if: $NIGHTLY
     # Only run the update on scheduled nightly pipelines, ie once a day
-    - if: $CI_PIPELINE_SOURCE == "schedule"
-    # And only update the metadata for master branch
-    - if: '$CI_COMMIT_BRANCH == "master"'
+    - if: $NIGHTLY && $CI_PIPELINE_SOURCE == "schedule" && $CI_COMMIT_BRANCH == "master"
 
 
 ghcup-metadata-release:
-- 
GitLab