Skip to content

Commit 034b160

Browse files
authored
Run Sonar scan before Grype (#614)
1 parent 0bc6306 commit 034b160

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

.github/workflows/build.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,13 @@ jobs:
5353
with:
5454
report_paths: '**/build/test-results/test/TEST-*.xml'
5555

56+
- name: Sonar
57+
if: github.event.pull_request.head.repo.fork == false
58+
run: ./gradlew jacocoTestReport sonar
59+
env:
60+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
62+
5663
- name: Grype source code
5764
id: grype_source_code
5865
uses: anchore/scan-action@v6
@@ -79,13 +86,6 @@ jobs:
7986
name: ns4kafka
8087
path: ${{ github.workspace }}/build/libs/ns4kafka-${{ steps.metadata.outputs.current_version }}.jar
8188

82-
- name: Sonar
83-
if: github.event.pull_request.head.repo.fork == false
84-
run: ./gradlew jacocoTestReport sonar
85-
env:
86-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
87-
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
88-
8989
- name: Docker
9090
run: ./gradlew dockerBuild
9191

0 commit comments

Comments
 (0)