From c06d87129beba508f402cae202ecd60c7e423baa Mon Sep 17 00:00:00 2001 From: Ryan Roberts Date: Thu, 3 Jul 2025 15:36:43 +0100 Subject: [PATCH] ci: Don't run pipelines for detached heads By default, merge request pipelines run with detached heads. This is problematic for building the docs using ReadTheDocs because it requires a branch name to map to a version in RTD. But with a detached head, there is no branch. So let's disable MR pipelines. When pushing changes to a branch that has an MR, the branch pipeline will still run and the result shows up in the MR. Signed-off-by: Ryan Roberts --- .gitlab-ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 900ff4f..0ca7975 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,6 +2,12 @@ default: tags: - arm64 +workflow: + rules: + - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + when: never + - when: always + variables: KUBERNETES_CPU_REQUEST: 2 KUBERNETES_MEMORY_REQUEST: 8Gi -- GitLab