Interview Prep/GitHub Actions/Jobs, Steps, Matrix & Concurrency

What does `concurrency` guarantee, exactly?

AdvancedConceptJobs, Steps, Matrix & Concurrency
Answer

Within a concurrency group (workflow level or job level), at most one running and one pending run or job exist. When a new one arrives, any existing pending one is cancelled and replaced. With cancel-in-progress: true, the running one is cancelled as well. Without it, the new one waits. It does not queue more than one: a burst of five pushes results in the first running and only the last pending, which is perfect for deploys ("deploy latest") and wrong for anything that needs every commit processed.

All GitHub Actions questions Roadmap: GitHub Actions

More on Jobs, Steps, Matrix & Concurrency