Developers push several times quickly, and Actions queues redundant runs.
IntermediateScenarioScale, Submodules, LFS and GitHub Automation
Answer
Situation read → Only the latest commit of a branch needs CI.
What I'd do →
- Add concurrency to the workflow:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
- Do not cancel on
mainor deploy jobs; usecancel-in-progress: ${{ github.ref != 'refs/heads/main' }}. - Check runner usage afterwards.
Why → Cancelling stale runs saves minutes and cost.
Interview tip → Never cancel deploys mid-flight.
More on Scale, Submodules, LFS and GitHub Automation
A monorepo has 4 GB of history and developers only touch one service. How do you make their day-to-day faster?IntermediateDesigners commit PSD and video assets, and the repo keeps growing. How do you move them to Git LFS?IntermediateYour GitHub LFS bandwidth quota is exhausted and CI pulls fail. What do you do?AdvancedA repository uses a submodule. How does a developer get the right version of it?BeginnerSubmodules, subtree or a package manager for sharing code between repos?IntermediateCI cannot clone a private submodule: authentication fails in `actions/checkout`.Intermediate