GitHub Actions Tutorial — Reusable Workflows
Chapter 10 — Reusable Workflows
Reusable workflows let you define a workflow once and call it from other workflows — like a function for your CI/CD pipelines. Instead of copy-pasting the same 50-line job across 20 repositories, you write it once and reference it everywhere.
This eliminates duplication, enforces consistency, and makes maintenance simple: update the reusable workflow in one place and every caller gets the fix.
What You’ll Learn
- The
workflow_calltrigger and how it differs from other triggers - Defining inputs, outputs, and secrets in reusable workflows
- Calling reusable workflows from other workflows
- Composition patterns for complex pipelines
- Sharing workflows across an organization
Topics Covered
1. workflow_call
The trigger that turns a workflow into a callable function.
2. Inputs, Outputs, Secrets
Pass data in and out of reusable workflows.
Read: Inputs, Outputs, Secrets →
3. Calling Workflows
How to invoke reusable workflows from caller workflows.
4. Composition Patterns
Chain multiple reusable workflows into complex CI/CD pipelines.
5. Org Shared Workflows
Share reusable workflows across repositories in a GitHub organization.
Practice
Test your understanding with hands-on exercises.
← Previous: Chapter 9: Matrix Builds
Next: Chapter 11: Custom Actions →