From 00c69c4e1c3f54cb4bff55753d26e681345b3279 Mon Sep 17 00:00:00 2001 From: Wangchong Zhou Date: Wed, 23 Aug 2023 01:57:58 -0700 Subject: [PATCH] chore(ci) add concurrency control for CI --- .github/workflows/ci-large.yml | 5 +++++ .github/workflows/ci.yml | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/.github/workflows/ci-large.yml b/.github/workflows/ci-large.yml index aad2993c4..940a8f913 100644 --- a/.github/workflows/ci-large.yml +++ b/.github/workflows/ci-large.yml @@ -11,6 +11,11 @@ defaults: run: shell: bash +# cancel previous runs if new commits are pushed to the PR, but run for each commit on master +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: unit-large: name: 'Unit' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 74ed2b1aa..2aac6f80c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,11 @@ defaults: run: shell: bash +# cancel previous runs if new commits are pushed to the PR, but run for each commit on master +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: unit: name: 'Unit'