diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2985bf7f8..073e6999e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -13,9 +13,9 @@ on: - v[0-9]+ concurrency: - group: ${{ github.workflow }}-${{ github.ref }} # 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: Lint-Style: diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 3f2057887..79c4c50aa 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -10,6 +10,11 @@ on: - main - 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: build: name: Build docs