diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index 5e453c6..47ba965 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -20,7 +20,7 @@ jobs: - name: Setup .NET 6 uses: actions/setup-dotnet@v1 with: - dotnet-version: '6.0.x' # Ensure this matches your project's .NET version + dotnet-version: '6.0.x' # Make sure this matches your project's .NET version - name: Setup Java 17 # SonarScanner requires Java uses: actions/setup-java@v2 @@ -36,11 +36,15 @@ jobs: - name: Begin SonarCloud Analysis env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Provided by GitHub for the action + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} # SonarCloud token for authentication run: | export PATH="$HOME/.dotnet/tools:$PATH" - dotnet sonarscanner begin /k:"theslash84_AzureFunctionClamavKubernetes" /o:"theslash84" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.branch.name=main + dotnet sonarscanner begin \ + /k:"theslash84_AzureFunctionClamavKubernetes" \ + /o:"theslash84" \ + /d:sonar.login="${{ secrets.SONAR_TOKEN }}" \ + /d:sonar.host.url="https://sonarcloud.io" - name: Build Project run: dotnet build