Skip to content

Commit 1afa094

Browse files
committed
chore: prevent pipeline run on new branches without an MR
1 parent 4b63728 commit 1afa094

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.gitlab-ci.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ workflow:
33
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
44
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
55
when: never
6-
- if: $CI_COMMIT_BRANCH
6+
# run pipeline only on MRs and main branches
7+
- if: $CI_COMMIT_REF_PROTECTED
78

89
default:
910
tags:
@@ -15,6 +16,10 @@ default:
1516
- .npm/
1617
- node_modules/
1718
policy: pull
19+
retry:
20+
max: 2
21+
when:
22+
- runner_system_failure
1823

1924
variables:
2025
FF_NETWORK_PER_BUILD: "true"

0 commit comments

Comments
 (0)