From 2b68bfaa4a6f0af299c12d530efba55bbe0191db Mon Sep 17 00:00:00 2001 From: Jennifer Mah <42650198+JenniferMah@users.noreply.github.com> Date: Wed, 12 Jan 2022 10:36:10 -0800 Subject: [PATCH] chore: prevent Sonarcloud from running on forks (#595) --- .github/workflows/test-and-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-and-deploy.yml b/.github/workflows/test-and-deploy.yml index 2696e4347..d6de6b1c2 100644 --- a/.github/workflows/test-and-deploy.yml +++ b/.github/workflows/test-and-deploy.yml @@ -30,7 +30,7 @@ jobs: run: make test - name: Install SonarCloud scanner and run analysis - if: ${{ github.event_name == 'pull_request' || github.ref_type == 'branch' }} + if: ${{ github.event_name == 'pull_request' || github.ref_type == 'branch' && !github.event.pull_request.head.repo.fork }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}