Skip to content

Commit ea68fce

Browse files
committed
build(sonar): change sonar execution rule
1 parent 590ee2f commit ea68fce

File tree

2 files changed

+68
-55
lines changed

2 files changed

+68
-55
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,13 @@ jobs:
4040
distribution: temurin
4141
java-version: 17
4242
- name: Execute build test jacocoTestReport and sonar analysis
43-
if: endsWith(github.REF, '/master') == true
43+
if: endsWith(github.REF, '/master') == true || github.event.pull_request.head.repo.fork == false
4444
env:
4545
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4646
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
47-
run: ./gradlew build test jacocoTestReport sonar --refresh-dependencies --no-daemon --continue -Denv.ci=true
47+
run: ./gradlew clean build generateMergedReport sonar --refresh-dependencies --no-daemon --continue -Denv.ci=true
4848
- name: Execute build test jacocoTestReport pull request
49-
if: endsWith(github.REF, '/merge') == true
49+
if: github.event.pull_request.head.repo.fork == true
5050
env:
5151
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52-
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
53-
run: ./gradlew build test jacocoTestReport --refresh-dependencies --no-daemon --continue -Denv.ci=true
52+
run: ./gradlew clean build generateMergedReport --refresh-dependencies --no-daemon --continue -Denv.ci=true

docs/package-lock.json

Lines changed: 64 additions & 50 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)