diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index b62624612..9a948d038 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -15,6 +15,11 @@ on: workflow_dispatch: +concurrency: + # Group by PR to cancel outdated runs; unique run IDs keep non-PR runs independent. + group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.run_id }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + jobs: benchmark: runs-on: ${{ matrix.os }}