[gnome-build-meta/alatiera/ci-push] CI: only push from protected branches



commit b7c49b6b3d9289b0f03789a682dfae8b62da890c
Author: Jordan Petridis <jpetridis gnome org>
Date:   Sat Sep 15 14:06:23 2018 +0300

    CI: only push from protected branches
    
    This assumes that there will be no branch name collisions
    between protected branches.
    
    Close #60

 .gitlab-ci.yml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 6bbd726..da9bc44 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -112,10 +112,10 @@ before_script:
         flatpak build-export --arch="${ARCH}" --files=files repo/ "runtimes/${runtime}" "${FLATPAK_BRANCH}"
       done
 
-    # push the resulting runtimes to gbm.gnome.org
-    # FIXME: Only push from protected branches
+    # Assume there will be no branch name collisions,
+    # the ssh key is available only on protected branches
     - |
-      if [[ ${CI_COMMIT_REF_NAME} == "staging-3-30" ]]; then
+      if [ -z "$GITLAB_SSH_KEY" ]; then
         ostree-releng-scripts/rsync-repos --src repo/ --dest gbm-builder.gnome.org:public_html/repo/
       fi
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]