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.
More on Jobs, Steps, Matrix & Concurrency
How does `needs` work, and what happens to a job whose dependency failed or was skipped?BeginnerWhat is the implicit `success()` in a job `if`, and why is `always()` usually the wrong fix?IntermediateWhat values can `needs.<job>.result` take?BeginnerHow does a matrix expand, and how are job names generated?BeginnerHow do `include` and `exclude` work in a matrix?IntermediateWhat do `fail-fast` and `max-parallel` do?Beginner