Added Sonar JDK to worklow

This commit is contained in:
Erik C. Thauvin 2023-08-12 12:58:10 -07:00
parent 92ed30a415
commit 9270788386

View file

@ -6,9 +6,12 @@ jobs:
build-bld-project: build-bld-project:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env:
SONAR_JDK: "17"
strategy: strategy:
matrix: matrix:
java-version: [ 17, 19, 20 ] java-version: [ 17, 20 ]
steps: steps:
- name: Checkout source repository - name: Checkout source repository
@ -33,9 +36,11 @@ jobs:
- name: SonarCloud Scan - name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master uses: sonarsource/sonarcloud-github-action@master
if: success() && matrix.java-version == env.SONAR_JDK
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: > args: >
-Dsonar.organization=ethauvin-github -Dsonar.organization=ethauvin-github
-Dsonar.projectKey=my-ethauvin_HttpStatus -Dsonar.projectKey=my-ethauvin_HttpStatus