Skip to content

Commit eb77cac

Browse files
committed
Add option to cancel workflow if the PR is updated
1 parent cce3c36 commit eb77cac

File tree

5 files changed

+21
-1
lines changed

5 files changed

+21
-1
lines changed

.github/workflows/build_and_test_java_ubuntu.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
pull_request:
77
workflow_dispatch:
88

9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
11+
cancel-in-progress: true
12+
913
env:
1014
BUILD_TYPE: Release
1115

@@ -23,4 +27,4 @@ jobs:
2327
architecture: x64
2428

2529
- name: Build and test project with Maven
26-
run: mvn -B package --file pom.xml
30+
run: mvn -B package --file pom.xml

.github/workflows/build_and_test_mac.yml

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

9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
11+
cancel-in-progress: true
12+
913
env:
1014
BUILD_TYPE: Release
1115

.github/workflows/build_and_test_ubuntu.yml

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

9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
11+
cancel-in-progress: true
12+
913
env:
1014
BUILD_TYPE: Release
1115
PYTHON_VER: 3.8

.github/workflows/build_and_test_windows.yml

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

9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
11+
cancel-in-progress: true
12+
913
env:
1014
BUILD_TYPE: Release
1115

.github/workflows/build_wheels.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
workflow_dispatch:
55
pull_request:
66

7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
9+
cancel-in-progress: true
10+
711
jobs:
812
build_wheels:
913
name: Build wheels on ${{ matrix.os }}

0 commit comments

Comments
 (0)