GHA Performance Patterns
12 paste-ready GitHub Actions patterns that shave wallclock and minute-cost off real workflows. Each pattern: a before, an after, and the why. Letter PDF + HTML twin. The YAML is MIT.
Letter PDF + HTML twin + LICENSE.txt. Free updates within v1.x emailed to your purchase address.
Buy on Polar or get it free in the Everything Bundle ($59)What's inside
- 1. Concurrency cancel-in-progress (kills duplicate-PR-push burn) — 30-60% on a busy branch
- 2. Path filters: only build what changed — 50-95% in a monorepo
- 3. Dependency cache via setup-* (no actions/cache@v4 dance) — 30-90 sec/job
- 4. Use a faster runner only where you need cores — $0 if right, $200/mo if wrong
- 5. Matrix max-parallel + fail-fast: false done right — 5-30% on flaky matrices
- 6. Reusable workflows + composite actions — indirect: less drift, less maintenance
- 7. turborepo / nx affected: only test what changed — 60-90% in a monorepo
- 8. docker/buildx with GitHub Actions cache backend — 2-5 min on Docker jobs
- 9. Setup-node 20+ with corepack — 5-15 sec/job
- 10. Skip safe-but-slow setup-* when Node is preinstalled — 10-30 sec/job
- 11. Conditional steps:
if: always(),if: success(),if: github.event_name == 'push' - 12.
fetch-depth: 1by default — 5-30 sec on big repos
Two pages from the inside
| Pattern | What changes | Saves |
|---|---|---|
| 1. Concurrency cancel-in-progress | 3 lines on top of the workflow | 30-60% on a busy branch |
| 3. Cache via setup-* | Replaces a 6-line actions/cache@v4 block with one line | 30-90 sec/job |
| 7. turbo / nx affected | Replaces pnpm test with turbo run test --filter=... | 60-90% in a monorepo |
| 8. buildx + gha cache | Adds cache-from: type=gha + cache-to: type=gha,mode=max | 2-5 min on Docker jobs |
How is this different from the Cookbook?
The Cut Your CI Bill cookbook ($19, also on Polar) covers cost at the workflow architecture level (30 patterns + 5 paste-ready workflow templates: PR fast lane, monorepo affected-only, cache-everything, SHA-pinned actions, nightly full matrix). It's denser and broader.
This product covers performance at the line-by-line level: a tight set of 12 mechanical edits that compound to faster CI. No templates, no narrative chapters - just before / after / why.
Buy both? Skip both: get the Everything Bundle ($59) which includes both plus every other current and future depmedic playbook.
Free companions (no purchase needed)
npx ci-doctor- 16 audits across cost / security / hygiene. Tells you which patterns to apply.npx gha-budget- prices a workflow before you push.- /leaderboard.html - 107 OSS repos ranked by hygiene score, daily refresh.
- The Pin Bar 2026 - 1,461
uses:across 20 OSS repos, 59% pinned to SHA.
Ready
$14 one-time. Stripe via Polar. Refunds within 14 days, no questions.
Buy GHA Performance Patterns