From 9c43c30e66be3a5b376979d15d57e9d11b209ccd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Test=C3=A9?= Date: Fri, 3 Jan 2025 15:22:11 +0100 Subject: [PATCH] chore(ci): fix concurrency group format on pull request event Since the addition of pull_request_target event, github.ref context object return name of the base branch. So when a workflow was triggered on the base branch during an execution in a pull request, the latter would be cancelled. Using github.head_ref, when available, fixes this behavior. On any other event than pull_request or pull_request_target, github.ref will still be used and work as before. --- .github/workflows/aws_tfhe_fast_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/aws_tfhe_fast_tests.yml b/.github/workflows/aws_tfhe_fast_tests.yml index 049a5a5f71..c1b332564b 100644 --- a/.github/workflows/aws_tfhe_fast_tests.yml +++ b/.github/workflows/aws_tfhe_fast_tests.yml @@ -159,7 +159,7 @@ jobs: (github.event_name == 'pull_request' && needs.setup-instance.result != 'skipped') needs: [ should-run, setup-instance ] concurrency: - group: ${{ github.workflow }}_${{ github.ref }} + group: ${{ github.workflow }}_${{ github.head_ref || github.ref }} cancel-in-progress: true runs-on: ${{ needs.setup-instance.outputs.runner-name }} steps: