-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (38 loc) · 1.31 KB
/
dotnet.yml
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
41
42
43
on:
push:
branches:
- main
workflow_dispatch:
pull_request:
branches:
- develop
- release/**
- feature/**
jobs:
validate-changes:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
# Disabling shallow clone is recommended for improving relevancy of sonarqube reporting
fetch-depth: 0
- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
- name: Install dependencies
run: dotnet restore
- name: Sonarqube Begin
run: |
dotnet tool install --global dotnet-sonarscanner
dotnet sonarscanner begin /k:"k8sdash_k8s-dashboard-api" /o:"k8sdash" /d:sonar.login=${{ secrets.SONAR_TOKEN }} /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.vstest.reportsPaths="**/*.trx" /d:sonar.cs.opencover.reportsPaths="**/coverage.opencover.xml"
- name: Build Models
run: dotnet build ./K8SDashboard.Models
- name: Build Services
run: dotnet build ./K8SDashboard.Services
- name: Build Api
run: dotnet build ./K8SDashboard.Api
- name: Sonarqube end
run: dotnet sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}