diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml index e52981a7450..f9c37831446 100644 --- a/.github/workflows/sonar.yml +++ b/.github/workflows/sonar.yml @@ -22,4 +22,5 @@ jobs: - name: Jacoco Aggregate run: mvn jacoco:report-aggregate - name: Publish to Sonar + if: github.event.pull_request.head.repo.full_name == github.repository run: mvn -B -q -nsu sonar:sonar -Dsonar.projectKey=OpenAPITools_openapi-generator -Dsonar.organization=openapitools -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=${{ secrets.SONAR_LOGIN }} -Dsonar.branch.name=${GITHUB_REF##*/}