From 61d9a398710f38977cc7d2568902bcf97ee95739 Mon Sep 17 00:00:00 2001 From: Ashwin Bharambe Date: Wed, 30 Jul 2025 17:21:15 -0700 Subject: [PATCH] fix(ci): more correct concurrency key for workflows --- .github/workflows/integration-tests.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index aefaf6c9a..ad2ca7201 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -33,7 +33,19 @@ on: default: 'ollama' concurrency: - group: ${{ github.workflow }}-${{ github.ref }}-${{ contains(github.event.pull_request.labels.*.name, 're-record-tests') && 'rerecord' || 'replay' }} + # This creates three concurrency groups: + # ${{ github.workflow }}-${{ github.ref }}-rerecord (for valid triggers with re-record-tests label) + # ${{ github.workflow }}-${{ github.ref }}-replay (for valid triggers without re-record-tests label) + # ${{ github.workflow }}-${{ github.ref }}-no-run (for invalid triggers that will be skipped) + # The "no-run" group ensures that irrelevant label events don't interfere with the real workflows. + group: >- + ${{ github.workflow }}-${{ github.ref }}-${{ + (github.event.action == 'opened' || + github.event.action == 'synchronize' || + (github.event.action == 'labeled' && contains(github.event.pull_request.labels.*.name, 're-record-tests'))) && + (contains(github.event.pull_request.labels.*.name, 're-record-tests') && 'rerecord' || 'replay') || + 'no-run' + }} cancel-in-progress: true jobs: