Skip to content

Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.

ci: cancel superseded PR runs in every check workflow

Josh Corbett7fbe92fdb230
diff --git a/.github/workflows/frontend-checks.yml b/.github/workflows/frontend-checks.yml
index 4da61651df..6c1e425712 100644
--- a/.github/workflows/frontend-checks.yml
+++ b/.github/workflows/frontend-checks.yml
@@ -30,6 +30,15 @@ on:
type: boolean
default: true
+# One run per pull request: a new push cancels the superseded run. The PR number is used rather
+# than the head branch, which two forks can share. Pushes to main and merge groups fall back to
+# the run id and never cancel each other. The group names the workflow literally
+# because `github.workflow` is the caller's name inside a reusable workflow, and release.yml calls
+# several of these at once.
+concurrency:
+ group: frontend-checks-${{ github.event.pull_request.number || github.run_id }}
+ cancel-in-progress: true
+
jobs:
frontend-checks:
runs-on: ubuntu-latest
diff --git a/.github/workflows/frontend-tests.yml b/.github/workflows/frontend-tests.yml
index f660b84081..69cf866651 100644
--- a/.github/workflows/frontend-tests.yml
+++ b/.github/workflows/frontend-tests.yml
@@ -30,6 +30,15 @@ on:
type: boolean
default: true
+# One run per pull request: a new push cancels the superseded run. The PR number is used rather
+# than the head branch, which two forks can share. Pushes to main and merge groups fall back to
+# the run id and never cancel each other. The group names the workflow literally
+# because `github.workflow` is the caller's name inside a reusable workflow, and release.yml calls
+# several of these at once.
+concurrency:
+ group: frontend-tests-${{ github.event.pull_request.number || github.run_id }}
+ cancel-in-progress: true
+
jobs:
frontend-tests:
runs-on: ubuntu-latest
diff --git a/.github/workflows/openapi-checks.yml b/.github/workflows/openapi-checks.yml
index aff3c8ff53..c325e8797e 100644
--- a/.github/workflows/openapi-checks.yml
+++ b/.github/workflows/openapi-checks.yml
@@ -31,6 +31,15 @@ on:
type: boolean
default: true
+# One run per pull request: a new push cancels the superseded run. The PR number is used rather
+# than the head branch, which two forks can share. Pushes to main and merge groups fall back to
+# the run id and never cancel each other. The group names the workflow literally
+# because `github.workflow` is the caller's name inside a reusable workflow, and release.yml calls
+# several of these at once.
+concurrency:
+ group: openapi-checks-${{ github.event.pull_request.number || github.run_id }}
+ cancel-in-progress: true
+
jobs:
openapi-checks:
env:
diff --git a/.github/workflows/python-checks.yml b/.github/workflows/python-checks.yml
index 914861c67a..388a9e4b6e 100644
--- a/.github/workflows/python-checks.yml
+++ b/.github/workflows/python-checks.yml
@@ -32,6 +32,15 @@ on:
type: boolean
default: true
+# One run per pull request: a new push cancels the superseded run. The PR number is used rather
+# than the head branch, which two forks can share. Pushes to main and merge groups fall back to
+# the run id and never cancel each other. The group names the workflow literally
+# because `github.workflow` is the caller's name inside a reusable workflow, and release.yml calls
+# several of these at once.
+concurrency:
+ group: python-checks-${{ github.event.pull_request.number || github.run_id }}
+ cancel-in-progress: true
+
jobs:
python-checks:
env:
diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml
index 44057c49a5..976f5ebc56 100644
--- a/.github/workflows/python-tests.yml
+++ b/.github/workflows/python-tests.yml
@@ -30,8 +30,13 @@ on:
type: boolean
default: true
+# One run per pull request: a new push cancels the superseded run. The PR number is used rather
+# than the head branch, which two forks can share. Pushes to main and merge groups fall back to
+# the run id and never cancel each other. The group names the workflow literally
+# because `github.workflow` is the caller's name inside a reusable workflow, and release.yml calls
+# several of these at once.
concurrency:
- group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
+ group: python-tests-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
jobs:
diff --git a/.github/workflows/typegen-checks.yml b/.github/workflows/typegen-checks.yml
index ea5a456990..bae7b0d29f 100644
--- a/.github/workflows/typegen-checks.yml
+++ b/.github/workflows/typegen-checks.yml
@@ -31,6 +31,15 @@ on:
type: boolean
default: true
+# One run per pull request: a new push cancels the superseded run. The PR number is used rather
+# than the head branch, which two forks can share. Pushes to main and merge groups fall back to
+# the run id and never cancel each other. The group names the workflow literally
+# because `github.workflow` is the caller's name inside a reusable workflow, and release.yml calls
+# several of these at once.
+concurrency:
+ group: typegen-checks-${{ github.event.pull_request.number || github.run_id }}
+ cancel-in-progress: true
+
jobs:
typegen-checks:
env:
diff --git a/.github/workflows/uv-lock-checks.yml b/.github/workflows/uv-lock-checks.yml
index 5f7d71e34f..e64cef1297 100644
--- a/.github/workflows/uv-lock-checks.yml
+++ b/.github/workflows/uv-lock-checks.yml
@@ -34,6 +34,15 @@ on:
type: boolean
default: true
+# One run per pull request: a new push cancels the superseded run. The PR number is used rather
+# than the head branch, which two forks can share. Pushes to main and merge groups fall back to
+# the run id and never cancel each other. The group names the workflow literally
+# because `github.workflow` is the caller's name inside a reusable workflow, and release.yml calls
+# several of these at once.
+concurrency:
+ group: uv-lock-checks-${{ github.event.pull_request.number || github.run_id }}
+ cancel-in-progress: true
+
jobs:
uv-lock-checks:
env: