Skip to content

Commit 2e45374

Browse files
committed
Prevent triggering the GHA for PRs twice
Only consider develop branch for push trigger Improve Job name
1 parent 4ca5dd6 commit 2e45374

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/maven.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
name: Java CI
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
pull_request:
48

59
jobs:
610
build:
7-
name: ${{ matrix.isMainBuildEnv && 'Primary Build' || 'Secondary Build' }}
11+
name: ${{ matrix.namePrefix }} Maven build (${{ matrix.os }}, JDK ${{ matrix.jdk }})
812
strategy:
913
matrix:
1014
os: [ubuntu-latest, windows-latest, macOS-latest]
@@ -14,6 +18,7 @@ jobs:
1418
- os: ubuntu-latest
1519
jdk: 17
1620
isMainBuildEnv: true
21+
namePrefix: 'Main '
1722
fail-fast: false
1823

1924
runs-on: ${{ matrix.os }}

0 commit comments

Comments
 (0)