File tree Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Original file line number Diff line number Diff line change 1
- name : Build
1
+ name : SonarCloud
2
2
on :
3
3
push :
4
4
branches :
7
7
types : [opened, synchronize, reopened]
8
8
jobs :
9
9
build :
10
- name : Build
10
+ name : Build and analyze
11
11
runs-on : windows-latest
12
12
steps :
13
- - name : Set up JDK 11
14
- uses : actions/setup-java@v2.5.0
13
+ - name : Set up JDK 17
14
+ uses : actions/setup-java@v3
15
15
with :
16
- java-version : 1.11
17
- - uses : actions/checkout@v2
16
+ java-version : 17
17
+ distribution : ' zulu' # Alternative distribution options are available.
18
+ - uses : actions/checkout@v3
18
19
with :
19
20
fetch-depth : 0 # Shallow clones should be disabled for a better relevancy of analysis
20
21
- name : Cache SonarCloud packages
21
- uses : actions/cache@v2.1.7
22
+ uses : actions/cache@v3
22
23
with :
23
24
path : ~\sonar\cache
24
25
key : ${{ runner.os }}-sonar
25
26
restore-keys : ${{ runner.os }}-sonar
26
27
- name : Cache SonarCloud scanner
27
28
id : cache-sonar-scanner
28
- uses : actions/cache@v2.1.7
29
+ uses : actions/cache@v3
29
30
with :
30
31
path : .\.sonar\scanner
31
32
key : ${{ runner.os }}-sonar-scanner
42
43
SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
43
44
shell : powershell
44
45
run : |
45
- .\.sonar\scanner\dotnet-sonarscanner begin /k:"deadmann_AdvancedRestHandler" /o:"deadmann" /d:sonar.login ="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io"
46
- <insert_your_clean_build_command>
47
- .\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login ="${{ secrets.SONAR_TOKEN }}"
46
+ .\.sonar\scanner\dotnet-sonarscanner begin /k:"deadmann_AdvancedRestHandler" /o:"deadmann" /d:sonar.token ="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io"
47
+ dotnet build
48
+ .\.sonar\scanner\dotnet-sonarscanner end /d:sonar.token ="${{ secrets.SONAR_TOKEN }}"
You can’t perform that action at this time.
0 commit comments