diff --git a/.github/workflows/sonar.yaml b/.github/workflows/sonar.yaml index e376bc2..1428e7a 100644 --- a/.github/workflows/sonar.yaml +++ b/.github/workflows/sonar.yaml @@ -25,6 +25,7 @@ jobs: run: go test -coverpkg=./... -coverprofile=coverage.out -json ./... > sonar-report.json - name: Upload coverage reports to Sonar - uses: sonarsource/sonarcloud-github-action@master env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + if: github.event.pull_request.head.repo.full_name == github.repository || env.SONAR_TOKEN != '' + uses: SonarSource/sonarqube-scan-action@v5.1.0 \ No newline at end of file