Skip to content

Commit 8635356

Browse files
Fix Sonar scan environment variable setup
1 parent 03b5bc8 commit 8635356

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/maven_pull_request.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ jobs:
2121
- name: Build with Maven
2222
run: mvn -B verify --file pom.xml
2323
- name: Scan with Sonar
24-
env:
25-
FORK: ${{ github.event.pull_request.head.repo.fork }}
26-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
27-
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
2824
run: |
2925
if [ $FORK = false ]
3026
then
3127
mvn org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=BerryCloud_xapi-java -Dsonar.organization=berrycloud --file pom.xml
3228
fi
29+
env:
30+
FORK: ${{ github.event.pull_request.head.repo.fork }}
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
32+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

0 commit comments

Comments
 (0)