I have a workflow that is set up to run/get triggered when a PR is merged successfully.
Snippet from workflow:
name: "On PR" on: pull_request: types: - closed branches: - develop
An example is I have a branch
test where I made some changes and then created PR to merge
test's changes into
This workflow works fine and triggers as expected. On the workflow - run list it shows
test as the branch while running the workflow - not
Now I have another which is set to trigger when the above workflow is completed.
Snippet from this workflow:
on: workflow_run: workflows: - "On PR" branches: - develop types: - completed
I have two issues here.
The Second workflow never gets triggered because the branches are set to
developif I set it to
testthen it does but branch
testis dynamic and I have no control of what that would be so I want to trigger this considering the destination PR merge branch name for it.
This second workflow gets triggered even if my previous PR merge workflow fails - how can I set it to only get triggered if “On PR” is completed successfully and not on fail.
Thanks in advance.