You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
997 B
39 lines
997 B
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
|
name: Sonarcloud
|
|
|
|
on:
|
|
# Do not run on pull-request because the required tokens
|
|
# cannot be read from there.
|
|
push:
|
|
# Explicitly specifying this results in tags being ignored, which is the goal.
|
|
branches: ["**"]
|
|
paths:
|
|
- .github/workflows/sonarcloud.yml
|
|
- sonar-project.properties
|
|
- "src/**"
|
|
- "tests/**"
|
|
|
|
env:
|
|
dotnetVersion: 8.0.x
|
|
|
|
jobs:
|
|
sonarcloud:
|
|
name: SonarCloud
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Get Source Code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0 # avoid shallow clone for GitVersion and Sonar analysis
|
|
|
|
- name: Setup dotnet
|
|
uses: actions/setup-dotnet@v4
|
|
with:
|
|
dotnet-version: ${{ env.dotnetVersion }}
|
|
|
|
- name: Install Tooling
|
|
run: dotnet tool restore
|
|
|
|
- name: Perform Scan
|
|
run: pwsh ci/RunSonarScan.ps1 -SonarToken "${{ secrets.SONAR_TOKEN }}"
|