From 80727753488e10ed4ddc661c69c4f4ff71e88bd0 Mon Sep 17 00:00:00 2001 From: Boshen Date: Thu, 1 Feb 2024 17:19:28 +0800 Subject: [PATCH] ci: don't cancel jobs on main (#5563) --- .github/workflows/bench.yml | 5 ++--- .github/workflows/ci.yml | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index 68787abbfa81..64424814e617 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -4,10 +4,9 @@ on: issue_comment: types: [created] -# cancel previous job runs for the same workflow + pr concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} - cancel-in-progress: true + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: ${{ github.ref_name != 'main' }} jobs: trigger: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 52651ad7f060..78da04d94e2f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ on: - "**" concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} cancel-in-progress: ${{ github.ref_name != 'main' }} jobs: