-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (37 loc) · 1.11 KB
/
dotnet-desktop.yml
File metadata and controls
40 lines (37 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: SonarCloud
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: '16 22 * * 3'
jobs:
build:
name: Build and analyze
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0.x'
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
- name: Restore
shell: bash
run: |
cd src
dotnet tool restore && dotnet restore ./Otel.Sample.App.sln
- name: Build and analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
shell: bash
run: |
cd src
dotnet sonarscanner begin /k:"jcmdsbr_otel-sample-dotnet" /o:"jcmdsbr" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" && \
dotnet build ./Otel.Sample.App.sln && \
dotnet sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"