Skip to content

Commit edb649d

Browse files
authored
Update sonar.yml
1 parent 6f7e084 commit edb649d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/sonar.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff 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 \

0 commit comments

Comments
 (0)