Production deploys must never run two at once for the same environment, but an in-progress deploy must finish even if a newer run is queued. Which concurrency block is correct?
Select an answer to reveal the explanation.
Short Explanation and Infographic
A shared concurrency group with cancel-in-progress: false serializes runs: new ones wait instead of killing the active deploy.
Full explanation below image
Full Explanation
The concurrency key ensures only one run (or job, if set at job level) in a named group is active. cancel-in-progress: true aborts the current run when a new one enters the group—useful for CI on feature branches, dangerous for production deploys. cancel-in-progress: false queues the new run until the current one completes. max-parallel belongs under strategy for matrix jobs, not concurrency. Use a group name that includes environment or branch as needed, e.g. deploy-${{ github.ref }}.