Skip to content

Commit

Permalink
Update workflow rules
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacques Xing committed Sep 17, 2024
1 parent 31d8d22 commit b6aaa44
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
workflow:
rules:
# Run pipeline on tags for the main project
- if: $CI_COMMIT_TAG && $CI_PROJECT_PATH == "xcompact3d/x3d2"
# Run pipeline on the default branch for the main project
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PROJECT_PATH == "xcompact3d/x3d2"
- if: $CI_COMMIT_BRANCH == "main" && $CI_PROJECT_PATH == "xcompact3d/x3d2"
# DO NOT run pipeline if Draft
- if: $CI_PIPELINE_SOURCE == "external_pull_request_event" && $CI_MERGE_REQUEST_TITLE =~ /^Draft:.*/
- if: $CI_PIPELINE_SOURCE == "external_pull_request_event" && $CI_MERGE_REQUEST_TITLE =~ /^(\[Draft\]|\(Draft\)|Draft:).*/
when: never
# Other merge requests trigger pipelines
- if: $CI_PIPELINE_SOURCE == "external_pull_request_event"
changes:
compare_to: 'refs/heads/main'
paths:
- '**/src/*'
- '**/examples/*'
- '**/tests/*'

stages:
- build-and-test
Expand Down

0 comments on commit b6aaa44

Please sign in to comment.