Skip to content

Commit

Permalink
Added sonarcloud workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
lvukadinovic-ib committed Oct 29, 2024
1 parent 78946dc commit f1fb2af
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: SonarCloud analysis

on: [push]

jobs:
sonarcloud:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.x'
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Install SonarScanner for .NET
run: dotnet tool install --global dotnet-sonarscanner
- name: Run SonarCloud Scan
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
dotnet-sonarscanner begin /k:"infobip_infobip-api-csharp-client" /o:"infobip" /d:sonar.login="${{ secrets.SONAR_TOKEN }}"
dotnet build
dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"

0 comments on commit f1fb2af

Please sign in to comment.