I know you can set it up so that the job only executes when there is a merge request to a specific branch but I don't want it to execute when the merge request is created, I want it to execute when the merge request is actually merged. I currently have it like this:
rules:
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"'
But as I said this is not what I want. I also tried this:
rules:
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master" && $CI_MERGE_REQUEST_APPROVED'
This did not work either. I know it is possible using the only keyword but I cannot use only I need to use rules. Would love some insight!