From 009d8d2784a18840cf29a65a5b6f01fd17a92c47 Mon Sep 17 00:00:00 2001
From: Marc-Olivier Andrez <marc-olivier.andrez@desy.de>
Date: Mon, 13 May 2024 18:38:36 +0200
Subject: [PATCH] ci: run a single GitLab CI pipeline

Commit to fix the current behavior of GitLab that triggers two CI
pipelines for the same commit.

For example, both the pipelines
[114510](https://gitlab.desy.de/asapo/asapo/-/pipelines/114510) and
[114511](https://gitlab.desy.de/asapo/asapo/-/pipelines/114511) ran on
the same commit 56d16797. See
https://gitlab.desy.de/asapo/asapo/-/merge_requests/214/pipelines
---
 .gitlab-ci.yml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f03622f31..f78199c04 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,3 +1,8 @@
+---
+workflow:
+  rules:
+    - if: $CI_COMMIT_BRANCH
+
 include:
   - local: deploy/build_env/services-linux/gitlab-ci-build-docker.yml
   - local: deploy/build_env/services-windows/gitlab-ci-build-docker.yml
-- 
GitLab