File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 4040 restore-keys : |
4141 ${{ runner.os }}-maven-
4242 - name : Cache SonarCloud packages
43+ if : ${{ env.SONAR_TOKEN != null && env.SONAR_TOKEN != '' && matrix.java_version == '11' }}
44+ env :
45+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
4346 uses : actions/cache@v2.1.3
4447 if : matrix.java_version == '11'
4548 with :
4952 - name : Run tests
5053 run : ./mvnw -V -B -ntp -ff verify jacoco:report
5154 - name : Static Analysis (Sonar)
52- if : matrix.java_version == '11'
55+ if : ${{ env.SONAR_TOKEN != null && env.SONAR_TOKEN != '' && matrix.java_version == '11' }}
5356 env :
5457 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5558 SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
Original file line number Diff line number Diff line change @@ -34,15 +34,17 @@ jobs:
3434 ${{ runner.os }}-maven-
3535 - name : Cache SonarCloud packages
3636 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 }}
3840 with :
3941 path : ~/.sonar/cache
4042 key : ${{ runner.os }}-sonar
4143 restore-keys : ${{ runner.os }}-sonar
4244 - name : Run tests
4345 run : ./mvnw -V -B -ntp -ff verify
4446 - name : Static Analysis (Sonar)
45- if : matrix.java_version == '11'
47+ if : ${{ env.SONAR_TOKEN != null && env.SONAR_TOKEN != '' && matrix.java_version == '11' }}
4648 env :
4749 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4850 SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
You can’t perform that action at this time.
0 commit comments