diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml index b592a1aa..f4414b67 100644 --- a/.github/workflows/sonarqube.yml +++ b/.github/workflows/sonarqube.yml @@ -16,8 +16,14 @@ jobs: steps: - uses: actions/checkout@v3 - - name: SonarQube Scan - uses: sonarsource/sonarqube-scan-action@master - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - SONAR_HOST_URL: https://sonarcloud.io + - name: SonarQube PR + if: github.event_name == 'pull_request' + working-directory: jhdf + run: > + ./gradlew sonarqube + -Dsonar.login=${{ secrets.SONAR_TOKEN }} + -Dsonar.pullrequest.branch=${{ github.ref }} + -Dsonar.pullrequest.key=${{ github.ref.name }} + -Dsonar.pullrequest.base=${{ github.base.ref }} + -Dsonar.pullrequest.github.repository=${{ github.server_url }}/${{ github.repository }} +