From 800069fc2d94095b7071b4370196ea4a3101be33 Mon Sep 17 00:00:00 2001 From: Callum Styan Date: Wed, 14 Feb 2024 10:09:26 -0800 Subject: [PATCH 1/4] test cancelling the backport pr workflow if it is already in progress for a specific pr Signed-off-by: Callum Styan --- .github/workflows/backport.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index 820d2758307ef..e375e27450cd7 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -4,7 +4,9 @@ on: types: - closed - labeled - +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: main: runs-on: ubuntu-latest From 36e5834381a38241005aaf4265565a67893b2996 Mon Sep 17 00:00:00 2001 From: Callum Styan Date: Wed, 14 Feb 2024 10:32:54 -0800 Subject: [PATCH 2/4] change how we look for the pr identifier Signed-off-by: Callum Styan --- .github/workflows/backport.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index e375e27450cd7..d9995cf947253 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -5,7 +5,7 @@ on: - closed - labeled concurrency: - group: ${{ github.workflow }}-${{ github.ref }} + group: ${{ github.workflow }}-${{ github.event.issue.number }} cancel-in-progress: true jobs: main: From df27a1fc701852420de83efb8f9023b994e9f1f5 Mon Sep 17 00:00:00 2001 From: Callum Styan Date: Wed, 14 Feb 2024 10:55:21 -0800 Subject: [PATCH 3/4] try cancelling via the pr number? Signed-off-by: Callum Styan --- .github/workflows/backport.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index d9995cf947253..2a7b5692701dd 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -5,7 +5,7 @@ on: - closed - labeled concurrency: - group: ${{ github.workflow }}-${{ github.event.issue.number }} + group: ${{ github.workflow }}-${{ github.event.pull_request.number }} cancel-in-progress: true jobs: main: From 35f003fd28d15234cdfd341c66826259f97ffcea Mon Sep 17 00:00:00 2001 From: Callum Styan Date: Wed, 14 Feb 2024 11:32:49 -0800 Subject: [PATCH 4/4] try having the concurrency bit on the job instead of in the top level Signed-off-by: Callum Styan --- .github/workflows/backport.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index 2a7b5692701dd..f5cfcc48e31ed 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -4,11 +4,11 @@ on: types: - closed - labeled -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number }} - cancel-in-progress: true + jobs: main: + concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }} runs-on: ubuntu-latest steps: - name: Checkout Actions