Skip to content

Commit

Permalink
Update and rename build.yml to SonarCloud.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinOomenTheDeveloper authored Jun 12, 2024
1 parent da25e88 commit c328add
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 48 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/SonarCloud.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
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 .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '7'

- 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 }}"
48 changes: 0 additions & 48 deletions .github/workflows/build.yml

This file was deleted.

0 comments on commit c328add

Please sign in to comment.