Trigger on push events to pull requests? #26366
-
On push trigger events, the workflow runs on all pushes to a repository branch. Is it possible to run on all pushes only if the repository branch is an opened pull request?
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @jeff-hernandez, welcome to the GitHub Support Community! Workflows can only be triggered by the events listed on this page: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
|
Beta Was this translation helpful? Give feedback.
Hi @jeff-hernandez, welcome to the GitHub Support Community! Workflows can only be triggered by the events listed on this page:
https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
pull_request
isn’t a valid type ofpush
event so this syntax won’t work. What you’re likely looking for is thesynchronize
type of thepull_request
event. This will trigger your workflow each time the HEAD branch is updated in a pull request—i.e. when it’s pushed to.https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#pull_request