Interview Prep/Git & GitHub/Scale, Submodules, LFS and GitHub Automation

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 →

  1. Add concurrency to the workflow:
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true
  1. Do not cancel on main or deploy jobs; use cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}.
  2. Check runner usage afterwards.

Why → Cancelling stale runs saves minutes and cost.

Interview tip → Never cancel deploys mid-flight.

All Git & GitHub questions Roadmap: Git & GitHub

More on Scale, Submodules, LFS and GitHub Automation