SonarQube GHA #8
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: SonarQube | |
on: | |
# Trigger analysis when pushing to your main branches, and when creating a pull request. | |
push: | |
branches: | |
- main | |
- master | |
- develop | |
- 'releases/**' | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
sonarqube: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: Set up JDK (x64) | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
architecture: 'x64' | |
distribution: 'temurin' | |
cache: 'gradle' | |
- name: SonarQube PR | |
if: github.event_name == 'pull_request' | |
working-directory: jhdf | |
run: | | |
./gradlew \ | |
-Dsonar.token=${{ secrets.SONAR_TOKEN }} \ | |
-Dsonar.pullrequest.branch=${{ github.ref }} \ | |
-Dsonar.pullrequest.key=${{ github.event.number }} \ | |
-Dsonar.pullrequest.base=${{ github.base.ref }} \ | |
-Dsonar.pullrequest.github.repository=${{ github.server_url }}/${{ github.repository }} \ | |
checkstyleMain checkstyleTest spotbugsMain spotbugsTest jacocoTestReport sonar |