From 5190f9d2938b0040094d60d1a00ffdaa2f363713 Mon Sep 17 00:00:00 2001 From: Ray Eldath Date: Tue, 24 Oct 2023 16:02:40 +0800 Subject: [PATCH] Limit CI concurrency to one per PR, redux This reverts commit 6fa22ecacaa57b37c01a3ae2efba369e61363802. Revert "Revert "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 See: https://github.com/cloudberrydb/cloudberrydb/pull/258 --- .github/workflows/build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7ed24723f90..9dcb2e015bd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,6 +5,9 @@ on: 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"