Skip to content

Commit 86f692d

Browse files
authored
Update SONAR_TOKEN usage in quality.yml
1 parent db1a60b commit 86f692d

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

.github/workflows/quality.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,12 @@ jobs:
4444
dotnet tool install --global dotnet-coverage
4545
- name: Build and analyze
4646
env:
47-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
4847
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
4948
shell: pwsh
5049
run: |
5150
$ErrorActionPreference = "Stop"
5251
$PSNativeCommandUseErrorActionPreference = $true
53-
${{ runner.temp }}\scanner\dotnet-sonarscanner begin /k:"rufer7_github-sonarcloud-integration" /o:"rufer7" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.projectBaseDir="D:\a\github-sonarcloud-integration\github-sonarcloud-integration" /d:sonar.cs.vscoveragexml.reportsPaths=coverage.xml /d:sonar.terraform.provider.azure.version=3.100.0
52+
${{ runner.temp }}\scanner\dotnet-sonarscanner begin /k:"rufer7_github-sonarcloud-integration" /o:"rufer7" /d:sonar.token="$env:SONAR_TOKEN" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.projectBaseDir="D:\a\github-sonarcloud-integration\github-sonarcloud-integration" /d:sonar.cs.vscoveragexml.reportsPaths=coverage.xml /d:sonar.terraform.provider.azure.version=3.100.0
5453
dotnet build .\src\ArbitrarySolution.sln --configuration Release
5554
dotnet-coverage collect 'dotnet test .\src\ArbitraryProject.Tests\ArbitraryProject.Tests.csproj' -f xml -o 'coverage.xml'
56-
${{ runner.temp }}\scanner\dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"
55+
${{ runner.temp }}\scanner\dotnet-sonarscanner end /d:sonar.token="$env:SONAR_TOKEN"

0 commit comments

Comments
 (0)