Skip to content

Commit 3cc5142

Browse files
authored
Cancel other github actions
If multiple commits are done in a short time, only run CI for the last one
1 parent 467f7a4 commit 3cc5142

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

.github/workflows/actions.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,23 @@ on:
88
branches: [ main ]
99
pull_request:
1010
branches: [ main ]
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
14+
cancel-in-progress: true
1115

1216
jobs:
1317
build:
14-
1518
runs-on: ubuntu-latest
1619
strategy:
1720
matrix:
1821
mongodb-version: [4.4]
19-
2022
steps:
2123
- uses: actions/checkout@v6
22-
2324
- uses: supercharge/mongodb-github-action@1.12.1
2425
with:
2526
mongodb-version: ${{ matrix.mongodb-version }}
2627
mongodb-replica-set: test-rs
27-
2828
- uses: actions/setup-java@v5
2929
with:
3030
java-version: 21
@@ -35,10 +35,8 @@ jobs:
3535
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
3636
restore-keys: |
3737
${{ runner.os }}-maven-
38-
3938
- name: Build with Maven
4039
run: mvn -B clean install
41-
4240
- name: Codecov
4341
uses: codecov/codecov-action@v5.5.2
4442
with:

0 commit comments

Comments
 (0)