Skip to content

Commit 2fdd7a1

Browse files
committed
SonarQube check runs only in master branch (workaround for https://jira.sonarsource.com/browse/MMF-1371)
1 parent f37d697 commit 2fdd7a1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/workflows/maven.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,13 @@ jobs:
4646
# Some tests need screen access
4747
- name: Install xvfb
4848
run: sudo apt-get install xvfb
49+
# SonarQube scan does not work for forked repositories
50+
# See https://jira.sonarsource.com/browse/MMF-1371
4951
- name: Build with Maven
52+
if: github.ref != ‘refs/heads/master’
53+
run: xvfb-run mvn clean verify
54+
- name: Build with Maven and run SonarQube analysis
55+
if: github.ref == ‘refs/heads/master’
5056
run: xvfb-run mvn clean verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
5157
env:
5258
# These two env variables are needed for sonar analysis

0 commit comments

Comments
 (0)