**Pipeline stage should only trigger when the merge request event is merged
stages:
- int
prerel-tag:
stage: int
image: docker:20.10.16
script:
- echo "this is testing commit for tagging"
rules:
- if: $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == "feat-reltag" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "rel1.0" && $CI_PIPELINE_SOURCE == "merge_request_event"
The above stage will trigger as soon as a merge request is created. But I need to trigger only when that is merged to the target branch. Tried a lot by looking at the gitlab docs, but in vain.
Really appreciate if someone could help on this