File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+ jobs :
9+ build :
10+ name : Build and Analyze
11+ runs-on : windows-latest
12+
13+ steps :
14+ - uses : actions/checkout@v4
15+ with :
16+ fetch-depth : 0
17+ - name : Set up JDK 17
18+ uses : actions/setup-java@v4
19+ with :
20+ java-version : 17
21+ distribution : ' zulu'
22+ - name : Cache SonarQube packages
23+ uses : actions/cache@v4
24+ with :
25+ path : ~\.sonar\cache
26+ key : ${{ runner.os }}-sonar
27+ restore-keys : ${{ runner.os }}-sonar
28+ - name : Cache SonarQube scanner
29+ id : cache-sonar-scanner
30+ uses : actions/cache@v4
31+ with :
32+ path : .\.sonar\scanner
33+ key : ${{ runner.os }}-sonar-scanner
34+ restore-keys : ${{ runner.os }}-sonar-scanner
35+ - name : Install SonarQube scanner
36+ if : steps.cache-sonar-scanner.outputs.cache-hit != 'true'
37+ shell : powershell
38+ run : |
39+ New-Item -Path .\.sonar\scanner -ItemType Directory
40+ dotnet tool update dotnet-sonarscanner --tool-path .\.sonar\scanner
41+ - name : Build and analyze
42+ shell : powershell
43+ run : |
44+ .\.sonar\scanner\dotnet-sonarscanner begin /k:"sp-tarkov_server-csharp_65d8d534-f5f5-4c24-ba01-a033b1ec3db8" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="${{ secrets.SONAR_HOST_URL }}"
45+ dotnet build
46+ .\.sonar\scanner\dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"
You can’t perform that action at this time.
0 commit comments