test: Cancel workflow when a PR is updated (#1084)
If another instance of the PR workflow is started for the same PR, cancel the old one. If a PR is updated and a new test run is started, the old test run will be cancelled automatically to conserve resources.
This commit is contained in:
parent
9429d26fcb
commit
98e5027fbc
|
@ -21,6 +21,13 @@ on:
|
|||
description: "The ref to build and test."
|
||||
required: False
|
||||
|
||||
# If another instance of this workflow is started for the same PR, cancel the
|
||||
# old one. If a PR is updated and a new test run is started, the old test run
|
||||
# will be cancelled automatically to conserve resources.
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.inputs.ref || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: Lint
|
||||
|
|
Loading…
Reference in New Issue