diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1cd6162..93f97ef 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -59,6 +59,9 @@ jobs: - name: Sonar env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_PROJECT: ${{ vars.GITHUB_REPOSITORY }} + SONAR_BRANCH: ${{ vars.GITHUB_REF_NAME }} + SONAR_ORGANIZATION: ${{ vars.SONAR_ORGANISATION }} run: | - echo "run sonar on " ${{ GITHUB_REF_NAME }} " for project key :"+${{ GITHUB_REPOSITORY }} - mvn -B package sonar:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=${{ vars.SONAR_ORGANIZATION }} -Dsonar.projectKey=${{ GITHUB_REPOSITORY }} + echo "run sonar on " $SONAR_BRANCH " for project key : " $SONAR_PROJECT + mvn -B package sonar:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=$SONAR_ORGANIZATION -Dsonar.projectKey=$SONAR_PROJECT -Dsonar.branch.name=$SONAR_BRANCH