Required workflows without repository workflows? #183730
-
Select Topic AreaQuestion BodyI've set multiple required workflows on organizational level, and it works as expected. Since actions is enabled, why isn't organization workflows triggered even if there isn't any repository workflows? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
|
Hi @konstruktoid 👋🏼 , Thanks for joining us here in the community! Required organizational workflows (and their associated status checks) will not run if the repository does not contain at least one workflow file for the trigger events in question, even if GitHub Actions is enabled for the repo. A workflow is defined by a YAML (.yml) file in the .github/workflows directory of your repository. Read more in our docs. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks @queenofcorgis, my question is more why a repository requires a local workflow when actions are enabled for the repository and we set the required workflows on a organizational level. It seems kind of redundant to add a noop workflow in the repository just to be able to trigger organizational workflows. |
Beta Was this translation helpful? Give feedback.
-
|
Based on what @queenofcorgis explained, it looks like this is just how GitHub has implemented required workflows - they won't trigger unless there's at least one workflow file in the repo's .github/workflows directory, even when Actions is enabled. I totally get your point though. It does feel redundant having to add a dummy workflow just to satisfy the org-level requirements. Would be nice if org workflows could trigger independently when Actions is enabled, without needing that local workflow file. For now, the workaround is creating a minimal workflow file in the repo that matches the trigger events your org workflows use. Not ideal, but gets the job done. |
Beta Was this translation helpful? Give feedback.
Based on what @queenofcorgis explained, it looks like this is just how GitHub has implemented required workflows - they won't trigger unless there's at least one workflow file in the repo's .github/workflows directory, even when Actions is enabled.
I totally get your point though. It does feel redundant having to add a dummy workflow just to satisfy the org-level requirements. Would be nice if org workflows could trigger independently when Actions is enabled, without needing that local workflow file.
For now, the workaround is creating a minimal workflow file in the repo that matches the trigger events your org workflows use. Not ideal, but gets the job done.