ci: Cancel all workflows consistently in pull requests without blocking main
The previous setup would cause multiple commits on main to be stuck in a pending state, waiting for the previous run to be finished. The new group specification is taken from: https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value This also adds the same settings for the docs workflow.
This commit is contained in:
committed by
Wolfgang Walther
parent
f9fdf666ad
commit
333f8cf592
@@ -13,9 +13,9 @@ on:
|
|||||||
- v[0-9]+
|
- v[0-9]+
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
# Terminate all previous runs of the same workflow for pull requests
|
# Terminate all previous runs of the same workflow for pull requests
|
||||||
cancel-in-progress: "${{ github.event_name == 'pull_request' }}"
|
group: ci-${{ github.head_ref || github.run_id }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Lint-Style:
|
Lint-Style:
|
||||||
|
|||||||
@@ -10,6 +10,11 @@ on:
|
|||||||
- main
|
- main
|
||||||
- v[0-9]+
|
- v[0-9]+
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
# Terminate all previous runs of the same workflow for pull requests
|
||||||
|
group: docs-${{ github.head_ref || github.run_id }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build docs
|
name: Build docs
|
||||||
|
|||||||
Reference in New Issue
Block a user