Use this when sharing workflows across repositories.
Reusable Workflows
Reusable workflows are called from other workflows with uses: owner/repo/.github/workflows/file.yml@ref and workflow_call inputs and secrets, sharing standard pipelines across repositories.
1. Reusable workflows share pipelines across repos.
2. Defined with on: workflow_call.
3. Pin versions.
4. Pass secrets explicitly (or inherit carefully).
5. Version and document.
caller workflow → reusable workflow → jobs
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verification path Verify boundary
The negative fixture should deliberately exercise risks such as event filter surprises, unpinned actions, secret/permission overreach, runner drift, matrix partial failure, artifact confusion and assuming conclusion=success shows external convergence, choosing the cases most relevant to workflow_call inputs/secrets/outputs, ref/version pinning, caller permissions and tracing nested workflow runs to the same target operation.
Step 2 Example Narrow the fault
jobs:
lint:
uses: org/ci/.github/workflows/lint.yml@v1
secrets: inherit
Step 3 Common mistakes Narrow the fault
- Referencing
@maininstead of a pinned tag/SHA. secrets: inheritpassing more than needed.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- workflow_call with inputs and secrets.
- Version with refs.
- Central maintenance.
- workflow_call reusable workflows — sharing
- Pin reusable workflow to SHA/tag — stability
- Inputs/secrets passed explicitly — interface
ReferenceWhy it matters1 section · depth on demand
What it is
Reusable workflows are called from other workflows with uses:, sharing pipelines across repositories.
ReferenceImportant terms & boundaries2 sections · depth on demand
In depth
Reusable workflows let one workflow call another with inputs and secrets, so common pipelines (lint, test, deploy) are defined once and used across many repositories.
# .github/workflows/ansible-ci.yml (shared)
on:
workflow_call:
inputs:
inventory: { type: string, required: true }
secrets:
VAULT_PASSWORD: { required: true }
# caller repository
jobs:
ci:
uses: org/ci-templates/.github/workflows/ansible-ci.yml@v2
with: { inventory: inventories/test }
secrets: inherit
Version reusable workflows with tags or commit SHAs so changes do not break all callers at once. Composite actions are the alternative for reusing a set of steps within a job.
Mechanics
The linked authority for bounded mechanics is GitHub Docs — Reuse workflows; documentation support is separate from observed lab/production Evidence.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in GitHub Actions > Reusable Workflows. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://docs.github.com/en/actions/how-tos/sharing-automations/reuse-workflows · confidence 94%Deep reference
Healthy vs suspicious evidence
Output interpretation
For workflow_call inputs/secrets/outputs, ref/version pinning, caller permissions and tracing nested workflow runs to the same target operation, prefer typed fields and stable IDs over human presentation text.