Skip to content

Commit

Permalink
Fix sonar should only run when owner is BerryCloud (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasturrell authored Apr 17, 2023
1 parent 6e33b1d commit 4db4dfc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ jobs:
run: mvn -B verify --file pom.xml
- name: Scan with Sonar
run: |
if [ $OWNER = "BerryCloud" ]
if [ $FORK = false]
then
mvn org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=BerryCloud_xapi-java -Dsonar.organization=berry-cloud -Dsonar.host.url=https://sonarcloud.io --file pom.xml
fi
env:
OWNER: ${{ github.repository_owner }}
FORK: ${{ github.event.pull_request.head.repo.fork }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

Expand Down

0 comments on commit 4db4dfc

Please sign in to comment.