File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -41,15 +41,17 @@ jobs:
41
41
${{ runner.os }}-maven-
42
42
- name : Cache SonarCloud packages
43
43
uses : actions/cache@v2.1.3
44
- if : matrix.java_version == '11'
44
+ if : ${{ env.SONAR_TOKEN != null && env.SONAR_TOKEN != '' && matrix.java_version == '11' }}
45
+ env :
46
+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
45
47
with :
46
48
path : ~/.sonar/cache
47
49
key : ${{ runner.os }}-sonar
48
50
restore-keys : ${{ runner.os }}-sonar
49
51
- name : Run tests
50
52
run : ./mvnw -V -B -ntp -ff verify jacoco:report
51
53
- name : Static Analysis (Sonar)
52
- if : matrix.java_version == '11'
54
+ if : ${{ env.SONAR_TOKEN != null && env.SONAR_TOKEN != '' && matrix.java_version == '11' }}
53
55
env :
54
56
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
55
57
SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
Original file line number Diff line number Diff line change @@ -34,15 +34,17 @@ jobs:
34
34
${{ runner.os }}-maven-
35
35
- name : Cache SonarCloud packages
36
36
uses : actions/cache@v2.1.3
37
- if : matrix.java_version == '11'
37
+ if : ${{ env.SONAR_TOKEN != null && env.SONAR_TOKEN != '' && matrix.java_version == '11' }}
38
+ env :
39
+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
38
40
with :
39
41
path : ~/.sonar/cache
40
42
key : ${{ runner.os }}-sonar
41
43
restore-keys : ${{ runner.os }}-sonar
42
44
- name : Run tests
43
45
run : ./mvnw -V -B -ntp -ff verify
44
46
- name : Static Analysis (Sonar)
45
- if : matrix.java_version == '11'
47
+ if : ${{ env.SONAR_TOKEN != null && env.SONAR_TOKEN != '' && matrix.java_version == '11' }}
46
48
env :
47
49
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
48
50
SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
You can’t perform that action at this time.
0 commit comments