From 0ffc86de33d9fb29cfb07c9b8b93d9e29931d5b8 Mon Sep 17 00:00:00 2001 From: Pavel Kirienko Date: Wed, 3 Apr 2024 12:37:26 +0300 Subject: [PATCH] Do not attempt to run sonar scanner if SONAR_TOKEN is not exported Secrets are not exported on builds originating from forks --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 395c042..3a1fa9c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -120,6 +120,7 @@ jobs: SONAR_SCANNER_VERSION: 4.6.1.2450 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + if: env.SONAR_TOKEN != '' steps: - uses: actions/checkout@v2 with: