I saw many posts about people asking if there is a way to trigger the workflow only on MERGE, which to me seems the most useful. However I did not see any answer, so I would like to find a solution.
At the moment I am stuck with:
on:
pull_request:
types: [closed]
Which is not ideal, as it would trigger the entire process even if I dismiss or close the PR without merging and I cannot see any reason on why this should happen.
I saw also:
github.event.pull_request.merged == true
but as my understanding this would run only for a particular action not on the entire workflow.
So my question is: how can I trigger a workflow only on pull_request merge?
Thanks