-
Notifications
You must be signed in to change notification settings - Fork 62.5k
Description
Code of Conduct
- I have read and agree to the GitHub Docs project's Code of Conduct
What article on docs.github.com is affected?
https://docs.github.com/en/actions/reference/events-that-trigger-workflows
What part(s) of the article would you like to see updated?
https://docs.github.com/en/actions/reference/events-that-trigger-workflows#pull_request
Additional information
This is a followup to #31007. While developing my own github workflow in a similar fashion to the use case described at https://github.com/orgs/community/discussions/25746, I was using the pull_request
trigger to avoid the issues of workflow_dispatch
. The first time I opened the PR from my branch against the default branch, the workflow ran as part of the PR. On following changes+pushes to the branch, the workflow stopped running. After a few hours of debugging, I discovered that the workflow did not run for the same reason as the linked discussion, i.e. the workflow file must be present in the default branch before I can run on.pull_request
from the feature branch. While I believe this is unacceptable behaviour for such a widely-spread CI system, I still think at the very least we deserve to have this documented. I believe the same wording
This event will only trigger a workflow run if the workflow file exists on the default branch.
used in many other parts of the document should be used.