Trigger conditional workflow when PR is merged
under review
Kim Yu Ng
I would like to trigger workflow or build when merging a PR from certain branch.
Since CircleCI has already supported conditional workflow and exposed git.branch in the pipeline, I believe this is doable with potential relative low effort if we have access to git.source_branch and git.event_type merge or maybe a simpler or higher-level API to accomplish this.
The current workaround provided by support seems to be hacky because it's cumbersome and it has to run workflow, trigger job and make an early exit in conditional step
The alternate workaround is using github action to make REST API to trigger the pipeline in CCI on closed pull_request against target branch with branch filtering of source branch.
B
Benedetta Dal Canton
under review