Using workflow_run
in pull requests from non-default branches or forks
#72097
-
Select Topic AreaQuestion BodyI'm working a python repository, where I am using I do not wish to trigger the testing workflows unless code quality cheks pass. I've set up configuration using Example configurations from a sample repository:
If someone can suggest what am I doing wrong, that'd be great. Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
The workflow_run event only works on the default branch. instead of using workflow_run, look at using reusable workflows. Then in your code quality workflow, if everything works there, you would call a reusable workflow to do the testing. |
Beta Was this translation helpful? Give feedback.
-
This is not exactly what the documentation says:
It is quite confusing because it reads as the file has to exist on the default branch, but there is nothing about on which branch the triggering workflow can be. In the OP case, the triggering workflow is on the feature branch. As per the description above, the workflow should be triggered in this case. |
Beta Was this translation helpful? Give feedback.
https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_run
The workflow_run event only works on the default branch.
instead of using workflow_run, look at using reusable workflows. Then in your code quality workflow, if everything works there, you would call a reusable workflow to do the testing.