diff --git a/.github/workflows/maven_pull_request.yml b/.github/workflows/maven_pull_request.yml index 954662a4..9a4579d1 100644 --- a/.github/workflows/maven_pull_request.yml +++ b/.github/workflows/maven_pull_request.yml @@ -22,11 +22,12 @@ jobs: run: mvn -B verify --file pom.xml - name: Scan with Sonar run: | - if [ $FORK = false ] + if [ $FORK = false ] && [ "$ACTOR" != "dependabot[bot]" ] then mvn org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=BerryCloud_xapi-java -Dsonar.organization=berrycloud --file pom.xml fi env: FORK: ${{ github.event.pull_request.head.repo.fork }} + ACTOR: ${{ github.actor }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}