Skip to content

Commit de84bf8

Browse files
authored
ci: Update SonarCloud workflow to use token variable (#1077)
1 parent 3dd27a2 commit de84bf8

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

.github/workflows/sonarcloud.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,11 @@ jobs:
2828
dotnet tool update dotnet-sonarscanner --global
2929
dotnet tool update dotnet-coverage --global
3030
- name: Build and analyze
31-
if: ${{ env.SONAR_TOKEN != null }}
3231
env:
3332
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3433
SONAR_TOKEN: ${{ secrets.sonar-auth-token }}
3534
run: |
36-
dotnet sonarscanner begin /k:"philips-software_roslyn-analyzers" /o:"philips-software" /d:sonar.login="${{ secrets.sonar-auth-token }}" /d:sonar.cs.vscoveragexml.reportsPaths="coverage.xml" /d:sonar.host.url="https://sonarcloud.io"
35+
dotnet sonarscanner begin /k:"philips-software_roslyn-analyzers" /o:"philips-software" /d:sonar.token="$SONAR_TOKEN" /d:sonar.cs.vscoveragexml.reportsPaths="coverage.xml" /d:sonar.host.url="https://sonarcloud.io"
3736
dotnet build --configuration Debug
38-
dotnet coverage collect 'dotnet test' -f xml -o 'coverage.xml'
39-
dotnet sonarscanner end /d:sonar.login="${{ secrets.sonar-auth-token }}"
37+
dotnet coverage collect 'dotnet test' -f xml -o 'coverage.xml'
38+
dotnet sonarscanner end /d:sonar.token="$SONAR_TOKEN"

0 commit comments

Comments
 (0)