Skip to content

Update SonarCloud.yml #4

Update SonarCloud.yml

Update SonarCloud.yml #4

Workflow file for this run

name: SonarCloud Analysis
on:
push:
branches:
- main
jobs:
sonarcloud:
name: SonarCloud Scan
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '17'
- name: Set up .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '7.0'
- name: Install SonarScanner
run: dotnet tool install --global dotnet-sonarscanner
- name: SonarCloud Scan
run: |
dotnet sonarscanner begin /k:""${{ secrets.SONAR_PROJECT }}"" /o:""${{ secrets.SONAR_ORGANIZATION }}"" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io"
dotnet build
dotnet sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"