Use concurrency groups to keep only the latest run active.
Section: Filters and concurrency
Cancel in-progress duplicate runs
yaml
yaml
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: trueExplanation
This is especially valuable on busy branches where every new push supersedes the prior run.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Filters and concurrency