From 5491706a388ec83b4572e99f6d28362f1ef0e49e Mon Sep 17 00:00:00 2001 From: Joshua Li Date: Mon, 13 Apr 2026 15:35:05 -0700 Subject: [PATCH] feat(ci): cancel in-progress PR workflows on new commit push --- .github/workflows/auto-release.yml | 5 +++++ .github/workflows/cleanup-pr-caches.yml | 4 ++++ .github/workflows/enforce-license-compliance.yml | 4 ++++ .github/workflows/gitflow-merge-conflict.yml | 4 ++++ 4 files changed, 17 insertions(+) diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml index 241900f4b6ff..67d926760f58 100644 --- a/.github/workflows/auto-release.yml +++ b/.github/workflows/auto-release.yml @@ -7,6 +7,11 @@ on: - master # This workflow triggers a release when merging a branch with the pattern `prepare-release/VERSION` into master. + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + permissions: contents: write pull-requests: write diff --git a/.github/workflows/cleanup-pr-caches.yml b/.github/workflows/cleanup-pr-caches.yml index eb65d9a642c1..97a49e7ebdce 100644 --- a/.github/workflows/cleanup-pr-caches.yml +++ b/.github/workflows/cleanup-pr-caches.yml @@ -4,6 +4,10 @@ on: types: - closed +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: cleanup: runs-on: ubuntu-latest diff --git a/.github/workflows/enforce-license-compliance.yml b/.github/workflows/enforce-license-compliance.yml index 0f186ad9a7a0..7085b0d4b074 100644 --- a/.github/workflows/enforce-license-compliance.yml +++ b/.github/workflows/enforce-license-compliance.yml @@ -15,6 +15,10 @@ on: - v9 - v8 +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: enforce-license-compliance: runs-on: ubuntu-24.04 diff --git a/.github/workflows/gitflow-merge-conflict.yml b/.github/workflows/gitflow-merge-conflict.yml index 8b31d07afd6a..769563c949c0 100644 --- a/.github/workflows/gitflow-merge-conflict.yml +++ b/.github/workflows/gitflow-merge-conflict.yml @@ -6,6 +6,10 @@ on: branches: - develop +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: check-merge-conflicts: name: Detect merge conflicts in gitflow PRs