Skip to content

Commit

Permalink
🐛 [Sonar] Disabled Sonar Scan for PR due SONAR_TOKEN not available fo…
Browse files Browse the repository at this point in the history
…r forks

Signed-off-by: Alberto Codutti <[email protected]>
  • Loading branch information
Coduz committed Jan 24, 2025
1 parent 3d876da commit 166a68e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/sonarCloud-scan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
branches:
- 'develop'

env:
SONAR_TOKEN_AVAILABLE: ${{ secrets.SONAR_TOKEN != '' }}

jobs:
build:
name: Analyze
Expand All @@ -32,8 +35,13 @@ jobs:
key: ${{ runner.os }}-sonar

- name: Build and analyze
if: ${{ env.SONAR_TOKEN_AVAILABLE == 'true' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: mvn -B compile -PsonarScan

- name: Skip Build and analyze
if: ${{ env.SONAR_TOKEN_AVAILABLE == 'false' }}
run: echo "Secret SONAR_TOKEN not available to this workflow run... Skipping analysis!"

0 comments on commit 166a68e

Please sign in to comment.