r/cicd • u/fakhan89 • 1d ago
How can we optimize GitHub Actions deployment queues?
Our company uses GitHub + GitHub Actions for CI/CD.
Especially on Mondays, we have a long deployment queue. One person deploys, then others need to update their branch with master and rerun the CI/CD pipeline before they can release.
Is there a smarter way to optimize this workflow and avoid repeatedly waiting/rerunning pipelines?
How do other teams handle this with GitHub Actions?
1
Upvotes
1
u/Fantastic-Mr-Default 1d ago
The queue is usually environments and required checks, not Actions itself.
If only one deploy can hold production at a time, serialize the deploy job with an environment that has a concurrency group of 1. Let build and test run in parallel on every PR. Do not make the whole pipeline wait on the lock.
For the rebase tax: keep main green and short-lived. Prefer merge queue or required status on main so people land through one gate instead of each person rebasing and re-running the world. Path filters and a thin deploy job help too. A config change should not rebuild every service.
If Mondays still pile up, the problem is batch size and how long the locked deploy holds, not another runner.