How do you reduce GitLab pipeline duration and runner cost?
IntermediateProductionGitHub Actions and GitLab CI in Production
Answer
Use needs for DAG execution, rules:changes to skip unaffected jobs, interruptible: true with auto-cancel, shared cache with cache:key:files, GIT_DEPTH: 20 for shallow clones, GIT_STRATEGY: fetch, a registry pull-through cache, smaller job images (Alpine/slim), and sharding via parallel. Use the pipeline analytics (CI/CD analytics, job durations) to find the longest jobs.
More on GitHub Actions and GitLab CI in Production
How do you organise reusable workflows for an organisation on GitHub?IntermediateHow do you reduce GitHub Actions minutes cost on private repos?IntermediateHow do you secure self-hosted runners?AdvancedHow do you design the GitHub Actions OIDC trust policy for AWS safely?AdvancedHow do you handle approvals and deployments across environments in GitHub Actions?IntermediateHow do you handle required checks when workflows use path filters or matrices?Advanced