From f446c06165bfc53e1c0aa3d4ee800415eafe9ac5 Mon Sep 17 00:00:00 2001 From: Marijn van der Horst Date: Wed, 4 Dec 2024 00:39:36 +0100 Subject: [PATCH] Try to disable codecov step when no secret available --- .github/workflows/build.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a0c2c7ba..9340c3b9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,6 @@ env: DB_DATABASE: esac DB_USERNAME: mysql DB_PASSWORD: mysql - HAS_CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN != '' }} jobs: tests: @@ -83,11 +82,13 @@ jobs: - name: Upload to Codecov uses: codecov/codecov-action@v3 - if: env.HAS_CODECOV_TOKEN + env: + codecov_token: ${{ secrets.CODECOV_TOKEN }} with: - token: ${{ secrets.CODECOV_TOKEN }} + token: ${{ env.codecov_token }} file: coverage.xml fail_ci_if_error: true + if: ${{ env.codecov_token != '' }} publish: name: Build and push Docker image