ci: Add workflow rules to control merge request pipelines

Prevent automatic merge request pipelines unless UTOOL_TRIGGER=1
is set. This allows utool to create controlled pipelines with
specific CI variables while preventing duplicate automatic pipelines.
This commit is contained in:
Simon Glass
2025-12-23 16:12:11 -07:00
parent 48dbdf7089
commit 170928aaa1
2 changed files with 13 additions and 0 deletions

View File

@@ -3,6 +3,18 @@
include:
- local: '.gitlab-ci-release.yml'
# Control when pipelines are created
workflow:
rules:
# Allow manual merge request pipelines when MANUAL_TRIGGER is set
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $MANUAL_TRIGGER == "1"'
when: always
# Prevent automatic merge request pipelines
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: never
# Allow all other pipeline sources (push, manual, API)
- when: always
variables:
DEFAULT_TAG: ""
MIRROR_DOCKER: docker.io

View File

@@ -1 +1,2 @@
test
test change