From e3d20afc6a36869531dde7b9155a5312c70c67d5 Mon Sep 17 00:00:00 2001 From: iphydf Date: Mon, 17 Jan 2022 23:23:14 +0000 Subject: [PATCH] chore: Run sonar scan on pull requests. --- .github/workflows/sonar-scan.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/sonar-scan.yml b/.github/workflows/sonar-scan.yml index 4b78b751..cfd396e1 100644 --- a/.github/workflows/sonar-scan.yml +++ b/.github/workflows/sonar-scan.yml @@ -3,7 +3,7 @@ name: sonar-scan on: push: branches: [master] - pull_request: + pull_request_target: branches: [master] jobs: @@ -37,13 +37,10 @@ jobs: unzip -o $HOME/.sonar/build-wrapper-linux-x86.zip -d $HOME/.sonar/ echo "$HOME/.sonar/build-wrapper-linux-x86" >> $GITHUB_PATH - name: Install dependencies and prepare build - run: | - .github/scripts/sonar-prepare + run: .github/scripts/sonar-prepare - name: Run build-wrapper - run: | - build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} .github/scripts/sonar-build + run: 'build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} .github/scripts/sonar-build' - name: Run sonar-scanner - if: github.event_name == 'push' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}