Run gitlab pipeline when commit to other branches except develop and master, also while merge to master branch

Task is to trigger gitlab pipeline when commit to other branches except develop and master, also while merge to master branch only.

rules:
- if: $CI_COMMIT_BRANCH != “master”
- if: $CI_COMMIT_BRANCH != “develop”
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == “master”