Share common setup across jobs.
Section: Real-world reuse patterns
Reuse CI step fragments
yaml
yaml
steps: &install_steps
- uses: actions/checkout@v4
- run: npm ci
jobs:
test:
steps: *install_steps
build:
steps: *install_stepsExplanation
A common pattern in CI configs when repeated steps would otherwise drift apart.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Real-world reuse patterns
Catch duplicate mapping keys
Lint for repeated keys that override silently in some parsers.
Merge shared mappings
Combine a base config with environment-specific overrides.