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
pull/8025/head^2
ibrahim halatci 2025-06-26 14:12:39 +03:00 committed by GitHub
parent 4cd8bb1b67
commit 8587de850b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -396,7 +396,8 @@ jobs:
flags: ${{ env.PG_MAJOR }}_citus_upgrade flags: ${{ env.PG_MAJOR }}_citus_upgrade
codecov_token: ${{ secrets.CODECOV_TOKEN }} codecov_token: ${{ secrets.CODECOV_TOKEN }}
upload-coverage: 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: env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
runs-on: ubuntu-latest runs-on: ubuntu-latest