How can an organization enforce that every repo runs a specific workflow?
AdvancedConceptCustom Actions & Reusable Workflows
Answer
Repository rulesets with the "Require workflows to pass before merging" rule (successor of the earlier "required workflows" feature): pick a workflow file from a central repo and a ref, target repositories by name pattern or property, and the workflow runs on PRs of every targeted repo and must pass. Combined with org-level allowed-actions policies and required reviewers on .github/workflows/** via CODEOWNERS, this is how platform teams enforce security scanning org-wide.
More on Custom Actions & Reusable Workflows
What are the three kinds of custom action and how do you choose?BeginnerWrite a minimal composite action that installs Node and dependencies with caching.IntermediateWhat can a composite action not do compared to a job?IntermediateHow do you pass outputs out of a composite action?IntermediateWhat does `action.yml` contain for a JavaScript action?IntermediateWhy must a JavaScript action commit its `dist/` or `node_modules`?Intermediate