mirror of
https://github.com/codecov/codecov-action.git
synced 2026-02-15 15:31:44 +00:00
fix: more ai fixes
This commit is contained in:
parent
66a562f347
commit
41afb5f14f
1 changed files with 7 additions and 6 deletions
13
action.yml
13
action.yml
|
|
@ -179,17 +179,18 @@ runs:
|
||||||
- name: Override branch for forks
|
- name: Override branch for forks
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
CC_BRANCH="${{ inputs.override_branch }}"
|
|
||||||
PR_HEAD_LABEL="${{ github.event.pull_request.head.label }}"
|
|
||||||
|
|
||||||
if [ -z "$CC_BRANCH" ] && [ -z "$CODECOV_TOKEN" ] && [ "${{ github.event.pull_request.head.repo.full_name }}" != "${{ github.repository }} ];
|
if [ -z "$CC_BRANCH" ] && [ -z "$CODECOV_TOKEN" ] && [ "${{ 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="$PR_HEAD_LABEL"
|
TOKENLESS="$GITHUB_EVENT_PULL_REQUEST_HEAD_LABEL"
|
||||||
CC_BRANCH="$PR_HEAD_LABEL"
|
CC_BRANCH="$GITHUB_EVENT_PULL_REQUEST_HEAD_LABEL"
|
||||||
echo "TOKENLESS=$TOKENLESS" >> $GITHUB_ENV
|
echo "TOKENLESS=$TOKENLESS" >> $GITHUB_ENV
|
||||||
echo "CC_BRANCH=$CC_BRANCH" >> $GITHUB_ENV
|
echo "CC_BRANCH=$CC_BRANCH" >> $GITHUB_ENV
|
||||||
fi
|
fi
|
||||||
|
env:
|
||||||
|
GITHUB_EVENT_PULL_REQUEST_HEAD_LABEL: ${{ github.event.pull_request.head.label }}
|
||||||
|
CC_BRANCH: ${{ inputs.override_branch }}
|
||||||
|
CC_TOKEN: ${{ env.CODECOV_TOKEN }}
|
||||||
|
|
||||||
- name: Upload coverage to Codecov
|
- name: Upload coverage to Codecov
|
||||||
run: ${GITHUB_ACTION_PATH}/dist/codecov.sh
|
run: ${GITHUB_ACTION_PATH}/dist/codecov.sh
|
||||||
|
|
@ -197,7 +198,7 @@ runs:
|
||||||
working-directory: ${{ inputs.working-directory }}
|
working-directory: ${{ inputs.working-directory }}
|
||||||
env:
|
env:
|
||||||
CC_BINARY: ${{ inputs.binary }}
|
CC_BINARY: ${{ inputs.binary }}
|
||||||
CC_BRANCH: $CC_BRANCH
|
CC_BRANCH: ${{ env.CC_BRANCH }}
|
||||||
CC_BUILD: ${{ inputs.override_build }}
|
CC_BUILD: ${{ inputs.override_build }}
|
||||||
CC_BUILD_URL: ${{ inputs.override_build_url }}
|
CC_BUILD_URL: ${{ inputs.override_build_url }}
|
||||||
CC_CODE: ${{ inputs.report_code }}
|
CC_CODE: ${{ inputs.report_code }}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue