[ci] Set actions workflow concurrency (#4060)

This sets the workflow concurrency to 1 for all workflows. For PRs this means if you push an additional commit older jobs will be cancelled.

The documentation workflow already only runs on tags or merges to main. For this, we cancel previous runs if they are to the same destination (tag or main) but still prevent 2 jobs from running at once if they are spawned from different refs.
This commit is contained in:
Austin Shalit
2022-02-27 20:13:58 -08:00
committed by GitHub
parent dae18308c9
commit d27ed3722b
7 changed files with 29 additions and 0 deletions

View File

@@ -2,6 +2,10 @@ name: Sanitizers
on: [pull_request, push]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
build:
strategy: