Skip to content

Commit 05e4f95

Browse files
committed
.github: fix sonarcloud integration
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
1 parent 9f27c99 commit 05e4f95

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

.github/workflows/coverage-check.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,13 @@ jobs:
8585
id: coverage
8686
if: steps.java-changes.outputs.any_changed == 'true'
8787
env:
88-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
88+
GITHUB_TOKEN: ${{ secrets.ACS_ROBOT_TOKEN }}
8989
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
90+
PR_ID: ${{ github.event.pull_request.number }}
9091
run: |
9192
git clone https://github.com/shapeblue/cloudstack-nonoss.git nonoss
9293
cd nonoss && bash -x install-non-oss.sh && cd ..
93-
mvn -P quality -Dsimulator -Dnoredist clean verify install org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=apachecloudstack
94+
mvn -P quality -Dsimulator -Dnoredist clean install org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=apachecloudstack -Dsonar.pullrequest.key=$PR_ID -Dsonar.pullrequest.base=main sonar.pullrequest.branch=refs/pull/${{ github.event.number }}/merge
9495
9596
echo "COVERAGE<<EOF" >> $GITHUB_ENV
9697
for file in ${{ steps.java-changes.outputs.all_changed_files }}; do

0 commit comments

Comments
 (0)