Skip to content

Commit 98a3fef

Browse files
committed
ci: add concurrency control to cancel outdated workflow runs
- Add concurrency groups to all workflow files - Automatically cancel previous workflow runs when new commits are pushed - Saves CI resources by not running workflows on superseded commits - Uses workflow name + PR number/ref for concurrency grouping
1 parent 919a128 commit 98a3fef

File tree

12 files changed

+48
-0
lines changed

12 files changed

+48
-0
lines changed

.github/workflows/appium_Android.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
- 3.x
77
- 5228-fix-appium-tests
88

9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
11+
cancel-in-progress: true
12+
913
env:
1014
CI: true
1115
# Force terminal colors. @see https://www.npmjs.com/package/colors

.github/workflows/appium_iOS.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
branches:
66
- 3.x
77

8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
10+
cancel-in-progress: true
11+
812
env:
913
CI: true
1014
# Force terminal colors. @see https://www.npmjs.com/package/colors

.github/workflows/check.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
branches:
77
- '**'
88

9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
11+
cancel-in-progress: true
12+
913
jobs:
1014
test:
1115
runs-on: ubuntu-22.04

.github/workflows/doc-generation.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
branches:
66
- 3.x
77

8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
812
jobs:
913
update-documentation:
1014
runs-on: ubuntu-22.04

.github/workflows/docker.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
branches:
66
- 3.x
77

8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
812
jobs:
913
push_to_registry:
1014
name: Build and push Docker image to Docker Hub

.github/workflows/dtslint.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
branches:
99
- '**'
1010

11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
13+
cancel-in-progress: true
14+
1115
jobs:
1216
test:
1317
runs-on: ubuntu-22.04

.github/workflows/playwright.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
branches:
99
- '**'
1010

11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
13+
cancel-in-progress: true
14+
1115
env:
1216
CI: true
1317
# Force terminal colors. @see https://www.npmjs.com/package/colors

.github/workflows/plugin.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
branches:
99
- '**'
1010

11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
13+
cancel-in-progress: true
14+
1115
env:
1216
CI: true
1317
# Force terminal colors. @see https://www.npmjs.com/package/colors

.github/workflows/puppeteer.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
branches:
99
- '**'
1010

11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
13+
cancel-in-progress: true
14+
1115
env:
1216
CI: true
1317
# Force terminal colors. @see https://www.npmjs.com/package/colors

.github/workflows/sharding-demo.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
branches:
99
- '**'
1010

11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
13+
cancel-in-progress: true
14+
1115
env:
1216
CI: true
1317
FORCE_COLOR: 1

0 commit comments

Comments
 (0)