From 7bc30e989c302ad28d05d046e695a391ee6f1dc7 Mon Sep 17 00:00:00 2001 From: Curt Bushko Date: Mon, 28 Aug 2023 12:05:25 -0400 Subject: [PATCH] Set concurrency for workflows (#18567) * Set concurrency for workflows --- .github/workflows/build-distros.yml | 4 ++++ .github/workflows/go-tests.yml | 5 +++++ .github/workflows/test-integrations.yml | 4 ++++ 3 files changed, 13 insertions(+) diff --git a/.github/workflows/build-distros.yml b/.github/workflows/build-distros.yml index 602acb18c1..4d8799a564 100644 --- a/.github/workflows/build-distros.yml +++ b/.github/workflows/build-distros.yml @@ -17,6 +17,10 @@ env: GOTAGS: ${{ endsWith(github.repository, '-enterprise') && 'consulent' || '' }} GOPRIVATE: github.com/hashicorp # Required for enterprise deps +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: true + jobs: setup: name: Setup diff --git a/.github/workflows/go-tests.yml b/.github/workflows/go-tests.yml index 9db458ed5d..db69f2dbbd 100644 --- a/.github/workflows/go-tests.yml +++ b/.github/workflows/go-tests.yml @@ -23,6 +23,11 @@ env: TEST_RESULTS: /tmp/test-results GOPRIVATE: github.com/hashicorp # Required for enterprise deps +# concurrency +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: true + jobs: conditional-skip: runs-on: ubuntu-latest diff --git a/.github/workflows/test-integrations.yml b/.github/workflows/test-integrations.yml index 71394bba91..0cf2995258 100644 --- a/.github/workflows/test-integrations.yml +++ b/.github/workflows/test-integrations.yml @@ -25,6 +25,10 @@ env: CONSUL_LATEST_IMAGE_NAME: ${{ endsWith(github.repository, '-enterprise') && github.repository || 'hashicorp/consul' }} GOPRIVATE: github.com/hashicorp # Required for enterprise deps +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: true + jobs: conditional-skip: runs-on: ubuntu-latest