One workflow, many callers
A reusable workflow is a workflow file with on: workflow_call. Other workflows reference it via uses:. The called workflow runs as its own job, with its own runner, but inherits secrets and variables from the caller.
Why this is the centralization mechanism
If 12 repos all need to do the same 'build, test, push to GHCR, smoke deploy' sequence, you don't want to maintain 12 copies. Put the workflow in a single repo (org/.github or org/ci), expose it as workflow_call, and let every consumer point at it.
Inputs, outputs, secrets
inputs— typed parameters from the caller (string, boolean, number).outputs— values produced by the called workflow, readable by the caller's downstream jobs.secrets— explicitly inherited or named one-by-one. Usesecrets: inheritfor the simple case.
Limitations to know
- Only 4 levels of nesting (a calls b calls c calls d).
- Cannot call a reusable workflow from a step (only from a job).
- The called workflow's
permissions:block applies, not the caller's.