Skip to content

Commit ada5c11

Browse files
committed
update branch name
1 parent 0f9eb32 commit ada5c11

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,15 @@ jobs:
2424
java-version: 1.8
2525
- name: Grant execute permission for gradlew
2626
run: chmod +x gradlew
27+
- name: Extract branch name
28+
shell: bash
29+
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
30+
id: extract_branch
2731
- name: Execute build test jacocoTestReport and Sonar
2832
env:
2933
SONAR_TOKEN: ${{secrets.SONAR_TOKEN}}
3034
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31-
run: ./gradlew build test jacocoTestReport sonarqube --refresh-dependencies --no-daemon --continue
35+
run: ./gradlew build test jacocoTestReport sonarqube -Dsonar.branch=${{ steps.extract_branch.outputs.branch }} --refresh-dependencies --no-daemon --continue
3236
# run: ./gradlew test jacocoTestReport && cp build/reports/jacoco/report.xml jacoco.xml || echo "Code coverage failed"
3337
# - name: Push codeCoverage to Codecov
3438
# run: bash <(curl -s https://codecov.io/bash)

0 commit comments

Comments
 (0)