Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/sonar-scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: SonarQube Scan
on:
push:
branches: [ "release" ]
pull_request:
types: [opened, synchronize, reopened]
branches: [ "master" ]
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab

jobs:
sonar-scan:
runs-on: bynder-arc
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Run SonarQube Scan
uses: bynder/github-actions/actions/sonarqube@master
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
# - name: Set up JDK 17
# uses: actions/setup-java@v4
# with:
# distribution: 'zulu'
# java-version: 17
# - name: Cache SonarQube packages
# uses: actions/cache@v4
# with:
# path: ~/.sonar/cache
# key: ${{ runner.os }}-sonar
# restore-keys: ${{ runner.os }}-sonar
# - name: Cache Maven packages
# uses: actions/cache@v4
# with:
# path: ~/.m2
# key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
# restore-keys: ${{ runner.os }}-m2
# - name: Build and analyze
# env:
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
# SONAR_PROJECT_KEY: ${{ secrets.SONAR_PROJECT_KEY }}
# run: |
# mvn sonar:sonar \
# -Dsonar.projectKey=${{ secrets.SONAR_PROJECT_KEY }} \
# -Dsonar.host.url=${{ secrets.SONAR_HOST_URL }} \
# -Dsonar.login=${{ secrets.SONAR_TOKEN }}
5 changes: 5 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,11 @@
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>3.9.1.2184</version>
</plugin>
</plugins>
</build>
</profile>
Expand Down
Loading