mirror of
https://github.com/codecov/codecov-action.git
synced 2025-12-23 20:27:02 +08:00
fix: use HEAD_REPO (#1690)
This commit is contained in:
@@ -187,7 +187,7 @@ runs:
|
|||||||
- name: Override branch for forks
|
- name: Override branch for forks
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
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
|
then
|
||||||
echo -e "\033[0;32m==>\033[0m Fork detected, tokenless uploading used"
|
echo -e "\033[0;32m==>\033[0m Fork detected, tokenless uploading used"
|
||||||
TOKENLESS="$GITHUB_EVENT_PULL_REQUEST_HEAD_LABEL"
|
TOKENLESS="$GITHUB_EVENT_PULL_REQUEST_HEAD_LABEL"
|
||||||
@@ -199,7 +199,7 @@ runs:
|
|||||||
env:
|
env:
|
||||||
CC_BRANCH: ${{ inputs.override_branch }}
|
CC_BRANCH: ${{ inputs.override_branch }}
|
||||||
GITHUB_EVENT_PULL_REQUEST_HEAD_LABEL: ${{ github.event.pull_request.head.label }}
|
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 }}
|
GITHUB_REPOSITORY: ${{ github.repository }}
|
||||||
|
|
||||||
- name: Override commits and pr for pull requests
|
- name: Override commits and pr for pull requests
|
||||||
|
|||||||
Reference in New Issue
Block a user