From 55edb59b27226e2176c345c72aec9c3d7ac543da Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Wed, 8 Jan 2025 11:42:06 -0500 Subject: [PATCH] ci: Disable Sonar if PR comes from a fork --- .github/workflows/sonar.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/sonar.yaml b/.github/workflows/sonar.yaml index 098f589d8..9d29e5a31 100644 --- a/.github/workflows/sonar.yaml +++ b/.github/workflows/sonar.yaml @@ -9,6 +9,8 @@ jobs: build: name: Build runs-on: ubuntu-22.04 + # Sonar Token can't be passed to PRs from forks. Disable Sonar workflow unless PR is from a branch. + if: github.event.pull_request.head.repo.full_name == github.repository steps: - uses: actions/checkout@v4 with: