File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -27,33 +27,37 @@ jobs:
2727 sonar :
2828 name : SonarCloud Scan
2929 runs-on : ubuntu-latest
30- if : ${{ !(github.event_name == 'pull_request' && startsWith(github.head_ref, 'renovate/')) && secrets.SONAR_TOKEN != '' }}
30+ if : ${{ !(github.event_name == 'pull_request' && startsWith(github.head_ref, 'renovate/')) }}
3131 steps :
3232 - uses : actions/checkout@v4
3333 with :
3434 fetch-depth : 0 # Shallow clones should be disabled for a better relevancy of analysis
3535
3636 - name : Set up JDK
37+ if : ${{ secrets.SONAR_TOKEN != '' }}
3738 uses : actions/setup-java@v4
3839 with :
3940 distribution : ' temurin'
4041 java-version : 17
4142
4243 - name : Cache SonarCloud packages
44+ if : ${{ secrets.SONAR_TOKEN != '' }}
4345 uses : actions/cache@v4
4446 with :
4547 path : ~/.sonar/cache
4648 key : ${{ runner.os }}-sonar
4749 restore-keys : ${{ runner.os }}-sonar
4850
4951 - name : Cache Maven packages
52+ if : ${{ secrets.SONAR_TOKEN != '' }}
5053 uses : actions/cache@v4
5154 with :
5255 path : ~/.m2
5356 key : ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
5457 restore-keys : ${{ runner.os }}-m2
5558
5659 - name : Build with Maven
60+ if : ${{ secrets.SONAR_TOKEN != '' }}
5761 run : |
5862 ./mvnw -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \
5963 -DskipTests \
You can’t perform that action at this time.
0 commit comments