From 653ca47807a32cf2609d31ebb8853796169a71dc Mon Sep 17 00:00:00 2001 From: Ariel Valentin Date: Sat, 27 Apr 2024 18:01:27 -0500 Subject: [PATCH] fix: Cancel duplicate builds This change cancels any pending builds when someone pushes changes before the tests are complete --- .github/workflows/ci-contrib-canary.yml | 4 ++++ .github/workflows/ci-contrib.yml | 4 ++++ .github/workflows/ci-instrumentation-with-services.yml | 4 ++++ .github/workflows/ci-instrumentation.yml | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/.github/workflows/ci-contrib-canary.yml b/.github/workflows/ci-contrib-canary.yml index 90c6b236f..5f7b02ee1 100644 --- a/.github/workflows/ci-contrib-canary.yml +++ b/.github/workflows/ci-contrib-canary.yml @@ -5,6 +5,10 @@ on: schedule: - cron: "0 0 * * *" +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number }} # Ensure that only one instance of this workflow is running per Pull Request + cancel-in-progress: true # Cancel any previous runs of this workflow + jobs: helpers: strategy: diff --git a/.github/workflows/ci-contrib.yml b/.github/workflows/ci-contrib.yml index eac8ffd30..33c612e69 100644 --- a/.github/workflows/ci-contrib.yml +++ b/.github/workflows/ci-contrib.yml @@ -9,6 +9,10 @@ on: branches: - main +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number }} # Ensure that only one instance of this workflow is running per Pull Request + cancel-in-progress: true # Cancel any previous runs of this workflow + jobs: helpers: strategy: diff --git a/.github/workflows/ci-instrumentation-with-services.yml b/.github/workflows/ci-instrumentation-with-services.yml index 259d97127..30ae037f2 100644 --- a/.github/workflows/ci-instrumentation-with-services.yml +++ b/.github/workflows/ci-instrumentation-with-services.yml @@ -9,6 +9,10 @@ on: branches: - main +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number }} # Ensure that only one instance of this workflow is running per Pull Request + cancel-in-progress: true # Cancel any previous runs of this workflow + jobs: instrumentation_with_services: strategy: diff --git a/.github/workflows/ci-instrumentation.yml b/.github/workflows/ci-instrumentation.yml index 59088633a..00b6f964f 100644 --- a/.github/workflows/ci-instrumentation.yml +++ b/.github/workflows/ci-instrumentation.yml @@ -9,6 +9,10 @@ on: branches: - main +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number }} # Ensure that only one instance of this workflow is running per Pull Request + cancel-in-progress: true # Cancel any previous runs of this workflow + jobs: instrumentation: strategy: