From 3cef3a5aef85cf40367c35512891a9939a803b14 Mon Sep 17 00:00:00 2001 From: Derek Roberts Date: Sun, 13 Nov 2022 19:46:18 -0800 Subject: [PATCH] Bug: sonarcloud version and mangled multiline strings (#5) --- .github/workflows/unit-tests.yml | 2 +- action.yml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 5d0632c..24c3a2d 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -35,7 +35,7 @@ jobs: npm run test:cov dir: ${{ matrix.dir }} repository: bcgov/nr-quickstart-typescript - sonar_args: | + sonar_args: > -Dsonar.exclusions=**/coverage/**,**/node_modules/** -Dsonar.organization=bcgov-nr -Dsonar.projectKey=bcgov-nr_action-test-and-analyse_${{ matrix.dir }} diff --git a/action.yml b/action.yml index 42da79b..6e09c4e 100644 --- a/action.yml +++ b/action.yml @@ -75,25 +75,25 @@ runs: # If sonar_project_token and sonar_comment_token, then run with comments - name: SonarCloud Scan if: inputs.sonar_project_token && inputs.sonar_comment_token - uses: SonarSource/sonarcloud-github-action@master + uses: SonarSource/sonarcloud-github-action@v1.7 env: GITHUB_TOKEN: ${{ inputs.sonar_comment_token }} SONAR_TOKEN: ${{ inputs.sonar_project_token }} with: projectBaseDir: ${{ inputs.dir }} - args: + args: > -Dsonar.pullrequest.github.summary_comment=true -Dsonar.project.monorepo.enabled=true ${{ inputs.sonar_args }} # If sonar_project_token and not sonar_comment_token, then run without comments - name: SonarCloud Scan if: inputs.sonar_project_token && ! inputs.sonar_comment_token - uses: SonarSource/sonarcloud-github-action@master + uses: SonarSource/sonarcloud-github-action@v1.7 env: SONAR_TOKEN: ${{ inputs.sonar_project_token }} with: projectBaseDir: ${{ inputs.dir }} - args: + args: > -Dsonar.pullrequest.github.summary_comment=false -Dsonar.project.monorepo.enabled=true ${{ inputs.sonar_args }}