I need to have a workflow that only runs on pull request reviews to the production
branch but currently they are running on all pull request reviews.
I tried all of these options:
on:
pull_request_review:
types: [submitted, edited]
branches:
- production
on:
pull_request_review:
types: [submitted, edited]
branches: [production]
on:
pull_request_review:
types: [submitted, edited]
branches: production
and the workflow gets executed when there's a pull request review from
feature-branch
to main
(not touching production
) at all.
What am I missing? How do you do this?
In GitHub Actions: run step only for certain pull request base branches, there's this workflow:
name: my-workflow
on:
push:
branches:
- develop
pull_request:
branches:
- develop
- main
types:
- closed
and the answer assumes that branches:
just works correctly. There's no mention about what else to do to make branches:
work. I already added a branches:
to my workflow and it's being ignored.