File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -61,26 +61,26 @@ jobs:
6161 with :
6262 fetch-depth : 0 # Shallow clones should be disabled for a better relevancy of analysis
6363 - name : Set up JDK 11
64- if : success()
64+ if : env.SONAR_TOKEN != null
6565 uses : actions/setup-java@v1
6666 with :
6767 java-version : 11
6868 - name : Cache SonarCloud packages
69- if : success()
69+ if : env.SONAR_TOKEN != null
7070 uses : actions/cache@v1
7171 with :
7272 path : ~/.sonar/cache
7373 key : ${{ runner.os }}-sonar
7474 restore-keys : ${{ runner.os }}-sonar
7575 - name : Cache Gradle packages
76- if : success()
76+ if : env.SONAR_TOKEN != null
7777 uses : actions/cache@v1
7878 with :
7979 path : ~/.gradle/caches
8080 key : ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
8181 restore-keys : ${{ runner.os }}-gradle
8282 - name : Build and analyze
83- if : success()
83+ if : env.SONAR_TOKEN != null
8484 env :
8585 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
8686 SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
You can’t perform that action at this time.
0 commit comments