Skip to content

Commit

Permalink
Update sonarcloud.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
theslash84 authored Mar 26, 2024
1 parent adf5837 commit 71571f3
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 71571f3

Please sign in to comment.