Skip to content

Commit 44a0757

Browse files
Skip SonarCloud analysis for Dependabot PRs (#302)
* Skip SonarCloud analysis for Dependabot PRs --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: thomasturrell <1552612+thomasturrell@users.noreply.github.com>
1 parent 5d6ff6e commit 44a0757

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

.github/workflows/maven_pull_request.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,12 @@ jobs:
2222
run: mvn -B verify --file pom.xml
2323
- name: Scan with Sonar
2424
run: |
25-
if [ $FORK = false ]
25+
if [ $FORK = false ] && [ "$ACTOR" != "dependabot[bot]" ]
2626
then
2727
mvn org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=BerryCloud_xapi-java -Dsonar.organization=berrycloud --file pom.xml
2828
fi
2929
env:
3030
FORK: ${{ github.event.pull_request.head.repo.fork }}
31+
ACTOR: ${{ github.actor }}
3132
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
3233
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

0 commit comments

Comments
 (0)