From 06476a8b0d1d67314700be0b1e3c83df5f920f9d Mon Sep 17 00:00:00 2001 From: Ray-Eldath Date: Wed, 11 Oct 2023 10:52:08 +0800 Subject: [PATCH] Limit CI concurrency to one per PR In current workflow, when newer commit comes, old pipeline won't get canceled, which wastes resources and cause unnecessary CI failure emails. This PR limits concurrency to one per PR. when newer commit comes, stale CI jobs will be automatically cancelled. See: https://stackoverflow.com/a/72408109/8711684 --- .github/workflows/build.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3d4d0d04de7..03c08e725a3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,7 +4,11 @@ on: types: [opened, synchronize, reopened, ready_for_review] branches: - main - + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} # from https://stackoverflow.com/a/72408109/8711684 + cancel-in-progress: true + env: BUILD_TYPE: "debug" FTS_MODE: "internal_fts"