Skip to content

A local-first personal finance app

:wrench: cancel previous CI runs if a new push is made (#1251)

Matiss Janis Aboltins168b38fc4bef
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 3acb452463..b18dc0ff39 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -13,6 +13,10 @@ on:
- master
pull_request:
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+ cancel-in-progress: true
+
jobs:
api:
runs-on: ubuntu-latest
diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml
index ff8be9702a..445e40f626 100644
--- a/.github/workflows/check.yml
+++ b/.github/workflows/check.yml
@@ -6,6 +6,10 @@ on:
- master
pull_request:
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+ cancel-in-progress: true
+
jobs:
lint:
runs-on: ubuntu-latest
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index cd03f44366..ee9383aa9f 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -7,6 +7,10 @@ on:
schedule:
- cron: '23 11 * * 6'
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+ cancel-in-progress: true
+
jobs:
analyze:
name: Analyze
diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml
index 144ed443ce..58bba08297 100644
--- a/.github/workflows/e2e-test.yml
+++ b/.github/workflows/e2e-test.yml
@@ -5,6 +5,10 @@ on: [pull_request]
env:
GITHUB_PR_NUMBER: ${{github.event.pull_request.number}}
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+ cancel-in-progress: true
+
jobs:
test:
name: Run end-to-end tests on Netlify PR preview
diff --git a/.github/workflows/electron.yml b/.github/workflows/electron.yml
index 795b398d40..5bf0c52184 100644
--- a/.github/workflows/electron.yml
+++ b/.github/workflows/electron.yml
@@ -13,6 +13,10 @@ on:
- master
pull_request:
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+ cancel-in-progress: true
+
jobs:
build:
strategy:
diff --git a/.github/workflows/release-notes.yml b/.github/workflows/release-notes.yml
index bfe2707c46..4a5bd4c22c 100644
--- a/.github/workflows/release-notes.yml
+++ b/.github/workflows/release-notes.yml
@@ -3,6 +3,10 @@ name: Release notes
on:
pull_request:
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+ cancel-in-progress: true
+
jobs:
release-notes:
runs-on: ubuntu-latest
diff --git a/.github/workflows/size-compare.yml b/.github/workflows/size-compare.yml
index a21c7ba007..2bceb77a44 100644
--- a/.github/workflows/size-compare.yml
+++ b/.github/workflows/size-compare.yml
@@ -14,6 +14,10 @@ name: Compare Sizes
on:
pull_request_target:
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+ cancel-in-progress: true
+
jobs:
compare:
runs-on: ubuntu-latest
diff --git a/upcoming-release-notes/1251.md b/upcoming-release-notes/1251.md
new file mode 100644
index 0000000000..d250d72346
--- /dev/null
+++ b/upcoming-release-notes/1251.md
@@ -0,0 +1,6 @@
+---
+category: Maintenance
+authors: [MatissJanis]
+---
+
+Cancel previous CI jobs if a new push is made