From 411c7b4ac46dd55811a3468c1873732c326a77c2 Mon Sep 17 00:00:00 2001 From: Michael Platings Date: Mon, 5 Feb 2024 10:08:10 +0000 Subject: [PATCH] Only run CI for main branch & merge requests Previously a pipeline was created both when a branch was pushed and when a merge request was created for that branch, which was both wasteful and caused a delay in the second pipeline completing. See https://docs.gitlab.com/ee/ci/pipelines/merge_request_pipelines.html#use-rules-to-add-jobs --- .gitlab-ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 99fbcc312..e67964ac0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,6 +4,12 @@ image: registry.gitlab.arm.com/intrinsiccv/intrinsiccv:4 +# Only run CI for main branch & merge requests +workflow: + rules: + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' + .common: tags: - arm64 -- GitLab