One minute
Avoid Multiple CI Executions When Having Multiple Commits in GitHub Actions
How to use concurrency cancellation in GitHub Actions to stop redundant workflow runs on push.
In GitHub Actions when you push several commits it might happen that it doesn’t make any sense to finish the previous CI executions.
To improve resources usage there is an easy way to cancel previous jobs automatically by adding the following lines to your CI setup:
on:
...
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
...