diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1a6a1ed..ed6b5fc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,8 +21,12 @@ jobs: - name: Setup Gradle uses: gradle/actions/setup-gradle@v3 - name: Build - run: ./gradlew spotlessCheck build jacocoTestReport sonar + run: ./gradlew spotlessCheck build env: OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} \ No newline at end of file + - name: Run Sonar + if: secrets.SONAR_TOKEN != '' + run: ./gradlew jacocoTestReport sonar + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}