Hi, my gitlab CI does not run any job when merge request is opened.
here is my .gitlabci.yml
stages:
- build
- test
- danger
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
- if: $CI_COMMIT_TAG
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
image: gradle:8.4.0-jdk17-jammy
cache:
key: "$CI_COMMIT_REF_NAME"
paths:
- .gradle
- build
before_script:
- export GRADLE_USER_HOME=`pwd`/.gradle
build:
stage: build
script:
- gradle build
test:
stage: test
script:
- gradle test
danger:
stage: danger
image: node:18
only:
- merge_requests
script:
- npm install
- npx danger ci