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 }}