How do you speed up slow GitHub Actions pipelines?
IntermediateProductionGitHub Actions, environments and releases in production
Answer
Cache dependencies and Docker layers (actions/cache, setup-* caching, buildx cache-to type=gha), run independent jobs in parallel, shard tests with a matrix, use path filters, cancel superseded runs with concurrency, and move to larger or faster runners for the long pole. Measure with job timing before tuning.
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
More on GitHub Actions, environments and releases in production
How do you structure workflows for a typical service (build, test, deploy)?BeginnerHow do reusable workflows differ from composite actions and when do you use each?IntermediateDesign a progressive delivery pipeline from merge to production using GitHub Actions and environments.AdvancedHow do you manage secrets and variables across org, repo and environment levels?IntermediateWhat does `concurrency` do in a deploy workflow and why does it matter?BeginnerHow do you automate versioning and release notes?Intermediate