From 1b3a719e779f1dc9f4959fa774ee955356458556 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/check-redirects-on-rename.yml | 4 ++++ .github/workflows/codeql-analysis.yml | 4 ++++ .github/workflows/enforce-license-compliance.yml | 4 ++++ .github/workflows/enforce-version-convention.yml | 4 ++++ .github/workflows/lint-404s.yml | 4 ++++ .github/workflows/lint-external-links.yml | 4 ++++ .github/workflows/sync-labels.yml | 5 +++++ .github/workflows/test.yml | 4 ++++ 8 files changed, 33 insertions(+) diff --git a/.github/workflows/check-redirects-on-rename.yml b/.github/workflows/check-redirects-on-rename.yml index efc1ffcef5002..4784afd81df98 100644 --- a/.github/workflows/check-redirects-on-rename.yml +++ b/.github/workflows/check-redirects-on-rename.yml @@ -4,6 +4,10 @@ on: pull_request: branches: [master] +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: check-redirects: name: Check redirects for renamed files diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 9f073aed15f32..f881bdac643ad 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -11,6 +11,10 @@ on: - '**.ts' - '**.tsx' +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: analyze: name: Analyze diff --git a/.github/workflows/enforce-license-compliance.yml b/.github/workflows/enforce-license-compliance.yml index b6d1344702c6a..6b66f4189ab17 100644 --- a/.github/workflows/enforce-license-compliance.yml +++ b/.github/workflows/enforce-license-compliance.yml @@ -6,6 +6,10 @@ on: pull_request: branches: [master] +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: enforce-license-compliance: runs-on: ubuntu-latest diff --git a/.github/workflows/enforce-version-convention.yml b/.github/workflows/enforce-version-convention.yml index bfd1e6a6b098c..4c412ab5f4899 100644 --- a/.github/workflows/enforce-version-convention.yml +++ b/.github/workflows/enforce-version-convention.yml @@ -6,6 +6,10 @@ on: pull_request: branches: [master] +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: check-version-convention: runs-on: ubuntu-latest diff --git a/.github/workflows/lint-404s.yml b/.github/workflows/lint-404s.yml index 8333b63b33046..5390c1b5b1d7c 100644 --- a/.github/workflows/lint-404s.yml +++ b/.github/workflows/lint-404s.yml @@ -6,6 +6,10 @@ on: pull_request: branches: [master] +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: lint-404: runs-on: ubuntu-latest diff --git a/.github/workflows/lint-external-links.yml b/.github/workflows/lint-external-links.yml index f77a5dea1f3e9..aa04a44f0e591 100644 --- a/.github/workflows/lint-external-links.yml +++ b/.github/workflows/lint-external-links.yml @@ -12,6 +12,10 @@ on: pull_request: branches: [master] +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: # Job for PRs: check only changed files check-pr: diff --git a/.github/workflows/sync-labels.yml b/.github/workflows/sync-labels.yml index 95e10f516e7a9..f3d4c6fe0c822 100644 --- a/.github/workflows/sync-labels.yml +++ b/.github/workflows/sync-labels.yml @@ -10,6 +10,11 @@ on: - .github/labels.yml # hack for https://github.com/actions/cache/issues/810#issuecomment-1222550359 + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + env: SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 344c02c805b69..941a4b506425e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,6 +6,10 @@ on: pull_request: branches: [master] +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: job_lint: name: Lint