I'm looking for a bit of an unusual use case, where I only run certain jobs after a push to origin/master. In practice, this only happens when a merge goes in so my first attempt at this was the following rule:
if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_COMMIT_BRANCH == "master"'
This didn't work though, presumably because the actual merge commit pushed to origin/master is not considered a merge_request_event.
Any way to achieve this?
Note: I don't simply use if: $CI_COMMIT_BRANCH == "master"' to avoid running on a push to a non-origin fork's master branch.