From 8587de850bbd17b42649d70138423948c4453f27 Mon Sep 17 00:00:00 2001 From: ibrahim halatci Date: Thu, 26 Jun 2025 14:12:39 +0300 Subject: [PATCH] Filter out upload coverage action for PRs from forks (#8033) add condition to filter out coverage upload action for PRs from forks as the necessary secret is not available to them and fails the whole pipeline --- .github/workflows/build_and_test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 07b093f04..f9b9f5701 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -396,7 +396,8 @@ jobs: flags: ${{ env.PG_MAJOR }}_citus_upgrade codecov_token: ${{ secrets.CODECOV_TOKEN }} upload-coverage: - if: always() + # secret below is not available for forks so disabling upload action for them + if: ${{ github.event.pull_request.head.repo.full_name == github.repository || github.event_name != 'pull_request' }} env: CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} runs-on: ubuntu-latest