From 5cf60df1d31f1a4d4273a2860f6e72babbe66269 Mon Sep 17 00:00:00 2001 From: Nick Boldt Date: Wed, 16 Oct 2024 11:02:43 -0300 Subject: [PATCH] chore(release): only the release action should be gated to one at a time; PR build and test should be able to run in parallel across multiple PRs (RHIDP-4430) (#2370) * chore(release) only the release action should be gated to one at a time; PR build and test should be able to run in parallel across multiple PRs (RHIDP-4430) Signed-off-by: Nick Boldt * enforce only one action can run at a time for a given PR; updating a PR, actions in progress will be cancelled to start a fresh one Signed-off-by: Nick Boldt --------- Signed-off-by: Nick Boldt --- .github/workflows/pr-build.yaml | 6 ++++-- .github/workflows/pr-test.yaml | 6 ++++-- .github/workflows/release.yaml | 3 ++- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr-build.yaml b/.github/workflows/pr-build.yaml index 5b6ff9d6ac..2626098451 100644 --- a/.github/workflows/pr-build.yaml +++ b/.github/workflows/pr-build.yaml @@ -6,9 +6,11 @@ env: TURBO_SCM_BASE: ${{ github.event.pull_request.base.sha }} TURBO_SCM_HEAD: ${{ github.sha }} +# enforce only one action can run at a time for a given PR, and +# when updating a PR, actions in progress will be cancelled to start a fresh one concurrency: - group: push - cancel-in-progress: false + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: build: diff --git a/.github/workflows/pr-test.yaml b/.github/workflows/pr-test.yaml index bd64058028..55970449a9 100644 --- a/.github/workflows/pr-test.yaml +++ b/.github/workflows/pr-test.yaml @@ -6,9 +6,11 @@ env: TURBO_SCM_BASE: ${{ github.event.pull_request.base.sha }} TURBO_SCM_HEAD: ${{ github.sha }} +# enforce only one action can run at a time for a given PR, and +# when updating a PR, actions in progress will be cancelled to start a fresh one concurrency: - group: push - cancel-in-progress: false + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: test: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 3fdc96945e..7665087dbc 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -14,8 +14,9 @@ on: - 1.2.x - release-[0-9].[0-9]* +# enforce only one release action at a time concurrency: - group: push + group: ${{ github.workflow }} cancel-in-progress: false jobs: