From 9d4659c3d590dc39dea722d8ed0ffc20bac8eacb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon?= <2082481+haakemon@users.noreply.github.com> Date: Tue, 16 Aug 2022 12:41:51 +0200 Subject: [PATCH] chore: attempt to skip SonarCloud run on external PR's (#387) --- .github/workflows/build.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 72875886c7..7900176488 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -41,7 +41,10 @@ jobs: run: yarn test --coverage - name: SonarCloud Scan - if: github.event.repository.fork == false + if: | + github.repository_owner == 'Altinn' && + (github.event_name != 'pull_request' && github.event.repository.fork == false) || + (github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false) with: projectBaseDir: app-frontend uses: SonarSource/sonarcloud-github-action@master