From df65498a6f44f7dbbd895f2258c43276ca118799 Mon Sep 17 00:00:00 2001 From: Ludovic DEHON Date: Fri, 29 Sep 2023 09:20:06 +0200 Subject: [PATCH] fix(cicd): don't failed external contributors pr for sonar --- .github/workflows/main.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 68388a5fa90..bbe8f792a41 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,11 +26,16 @@ on: jobs: check: + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} name: Check & Publish runs-on: ubuntu-latest timeout-minutes: 60 steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-python@v4 with: python-version: '3.x' @@ -101,6 +106,7 @@ jobs: ./gradlew check jacoco javadoc --no-daemon --priority=normal - name: Analyze with Sonar + if: ${{ env.SONAR_TOKEN != 0 }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}