Skip to content

Commit fe85c1c

Browse files
committed
Do not build twice on master
1 parent d010ef7 commit fe85c1c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
architecture: ${{ matrix.arch }}
4646

4747
- name: Build with Maven
48-
if: "${{ !(matrix.arch == 'x64' && matrix.os == 'ubuntu-20.04' && matrix.java == '11') || github.event.pull_request.head.repo.full_name != 'dnsjava/dnsjava' }}"
48+
if: "${{ !(matrix.arch == 'x64' && matrix.os == 'ubuntu-20.04' && matrix.java == '11') || (github.event.type == 'PullRequestEvent' && github.event.pull_request.head.repo.full_name != 'dnsjava/dnsjava') }}"
4949
run: mvn verify -B -"Dgpg.skip"
5050

5151
# doesn't work with PRs from forks, see https://jira.sonarsource.com/browse/MMF-1371
@@ -54,7 +54,7 @@ jobs:
5454
env:
5555
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5656
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
57-
run: mvn -X -B -"Dgpg.skip" verify jacoco:report org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
57+
run: mvn -B -"Dgpg.skip" verify jacoco:report org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
5858

5959
- name: Run codecovc
6060
if: "${{ matrix.arch == 'x64' && matrix.os == 'ubuntu-20.04' && matrix.java == '11' }}"

0 commit comments

Comments
 (0)