Skip to content

Commit

Permalink
fix: remove sonar cloud steps from build workflow
Browse files Browse the repository at this point in the history
- sonar can not run on prs from forks
  • Loading branch information
bmunguli committed Mar 28, 2024
1 parent a000a90 commit aaabb26
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions .github/workflows/build-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,30 +39,13 @@ jobs:
packages: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # required for sonar analysis

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
cache: maven

- name: Cache SonarCloud packages
uses: actions/cache@v4
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar

- name: Build and Deploy with Maven
run: mvn clean -X install
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: SonarCloud Code Analysis
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: mvn --batch-mode sonar:sonar -Dsonar.projectKey=eclipse-tractusx_sldt-digital-twin-registry -Dsonar.organization=eclipse-tractusx

0 comments on commit aaabb26

Please sign in to comment.