Skip to content

Commit e0380dc

Browse files
committed
feat: update GitHub Actions workflow to use SonarCloud with Ubuntu
1 parent 48457ac commit e0380dc

1 file changed

Lines changed: 14 additions & 6 deletions

File tree

.github/workflows/dotnet.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,21 @@ jobs:
8484
run: |
8585
echo "![Coverage](./coverage-report/badge_combined.svg)" > coverage-badge.md
8686
cat coverage-badge.md >> README.md
87-
88-
- name : Sonarqube (SonarCloud)
89-
if: matrix.platform.name == 'MacOS'
90-
uses: SonarSource/sonarqube-scan-action@v4.2.1
87+
88+
sonarcloud:
89+
name: SonarCloud
90+
runs-on: ubuntu-24.04
91+
needs: build
92+
steps:
93+
- uses: actions/checkout@v4
94+
with:
95+
# Disabling shallow clone is recommended for improving relevancy of reporting
96+
fetch-depth: 0
97+
- name: SonarCloud Scan
98+
uses: SonarSource/sonarcloud-github-action@v2
9199
env:
92-
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
93-
100+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
101+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
94102

95103
publish_badge:
96104
runs-on: ubuntu-24.04

0 commit comments

Comments
 (0)