From a76271d95946adc3b90b6bab0bb870368626d618 Mon Sep 17 00:00:00 2001 From: Tom Hu <88201630+thomasrockhu-codecov@users.noreply.github.com> Date: Wed, 20 Nov 2024 18:55:06 -0500 Subject: [PATCH] fix: use HEAD_REPO (#1690) --- action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index c7298144b..6b340f8a8 100644 --- a/action.yml +++ b/action.yml @@ -187,7 +187,7 @@ runs: - name: Override branch for forks shell: bash run: | - if [ -z "$CC_BRANCH" ] && [ -z "$CC_TOKEN" ] && [ -n "$GITHUB_EVENT_PULL_REQUEST_REPO_FULL_NAME" ] && [ "${GITHUB_EVENT_PULL_REQUEST_REPO_FULL_NAME}" != "$GITHUB_REPOSITORY" ]; + if [ -z "$CC_BRANCH" ] && [ -z "$CC_TOKEN" ] && [ -n "$GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FULL_NAME" ] && [ "${GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FULL_NAME}" != "$GITHUB_REPOSITORY" ]; then echo -e "\033[0;32m==>\033[0m Fork detected, tokenless uploading used" TOKENLESS="$GITHUB_EVENT_PULL_REQUEST_HEAD_LABEL" @@ -199,7 +199,7 @@ runs: env: CC_BRANCH: ${{ inputs.override_branch }} GITHUB_EVENT_PULL_REQUEST_HEAD_LABEL: ${{ github.event.pull_request.head.label }} - GITHUB_EVENT_PULL_REQUEST_REPO_FULL_NAME: ${{ github.event.pull_request.repo.full_name }} + GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FULL_NAME: ${{ github.event.pull_request.head.repo.full_name }} GITHUB_REPOSITORY: ${{ github.repository }} - name: Override commits and pr for pull requests