Skip to content

Commit 4575336

Browse files
committed
Only run sonar workflow when secret is present
Fixes xdev-software/standard-maven-template#57
1 parent 2f2221e commit 4575336

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/sonar.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
sonar:
2828
name: SonarCloud Scan
2929
runs-on: ubuntu-latest
30-
if: ${{ github.event_name != 'pull_request' || !startsWith(github.head_ref, 'renovate/') }}
30+
if: ${{ !(github.event_name == 'pull_request' && startsWith(github.head_ref, 'renovate/')) && secrets.SONAR_TOKEN != '' }}
3131
steps:
3232
- uses: actions/checkout@v4
3333
with:

0 commit comments

Comments
 (0)