Skip to content

API-2456 Sonarqube Java SDK #7

API-2456 Sonarqube Java SDK

API-2456 Sonarqube Java SDK #7

Workflow file for this run

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 }}