mirror of
https://github.com/codecov/codecov-action.git
synced 2026-02-13 14:37:24 +00:00
fix: remove unnecessary env vars
This commit is contained in:
parent
6c0ee7b7e8
commit
96d592f3f0
1 changed files with 5 additions and 9 deletions
14
action.yml
14
action.yml
|
|
@ -166,20 +166,20 @@ runs:
|
||||||
if [ ${{ inputs.use_oidc }} == 'true' ];
|
if [ ${{ inputs.use_oidc }} == 'true' ];
|
||||||
then
|
then
|
||||||
# {"count":1984,"value":"***"}
|
# {"count":1984,"value":"***"}
|
||||||
CODECOV_TOKEN=$(curl -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=api://AzureADTokenExchange" | cut -d\' -f6)
|
CC_TOKEN=$(curl -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=api://AzureADTokenExchange" | cut -d\' -f6)
|
||||||
echo "CODECOV_TOKEN=$CODECOV_TOKEN" >> $GITHUB_ENV
|
echo "CC_TOKEN=$CC_TOKEN" >> $GITHUB_ENV
|
||||||
else
|
else
|
||||||
if [ -n ${{ inputs.token }} ];
|
if [ -n ${{ inputs.token }} ];
|
||||||
then
|
then
|
||||||
CODECOV_TOKEN=${{ inputs.token }}
|
CC_TOKEN=${{ inputs.token }}
|
||||||
echo "CODECOV_TOKEN=$CODECOV_TOKEN" >> $GITHUB_ENV
|
echo "CC_TOKEN=$CC_TOKEN" >> $GITHUB_ENV
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Override branch for forks
|
- name: Override branch for forks
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
if [ -z "$CC_BRANCH" ] && [ -z "$CODECOV_TOKEN" ] && [ "${GITHUB_EVENT_PULL_REQUEST_REPO_FULL_NAME}" != "$GITHUB_REPOSITORY" ];
|
if [ -z "$CC_BRANCH" ] && [ -z "$CC_TOKEN" ] && [ "${GITHUB_EVENT_PULL_REQUEST_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"
|
||||||
|
|
@ -221,7 +221,6 @@ 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_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 }}
|
||||||
|
|
@ -250,13 +249,10 @@ runs:
|
||||||
CC_OS: ${{ inputs.os }}
|
CC_OS: ${{ inputs.os }}
|
||||||
CC_PARENT_SHA: ${{ inputs.commit_parent }}
|
CC_PARENT_SHA: ${{ inputs.commit_parent }}
|
||||||
CC_PLUGINS: ${{ inputs.plugins }}
|
CC_PLUGINS: ${{ inputs.plugins }}
|
||||||
CC_PR: $CC_PR
|
|
||||||
CC_REPORT_TYPE: ${{ inputs.report_type }}
|
CC_REPORT_TYPE: ${{ inputs.report_type }}
|
||||||
CC_SHA: $CC_SHA
|
|
||||||
CC_SKIP_VALIDATION: ${{ inputs.skip_validation }}
|
CC_SKIP_VALIDATION: ${{ inputs.skip_validation }}
|
||||||
CC_SLUG: ${{ inputs.slug }}
|
CC_SLUG: ${{ inputs.slug }}
|
||||||
CC_SWIFT_PROJECT: ${{ inputs.swift_project }}
|
CC_SWIFT_PROJECT: ${{ inputs.swift_project }}
|
||||||
CC_TOKEN: $CODECOV_TOKEN
|
|
||||||
CC_VERBOSE: ${{ inputs.verbose }}
|
CC_VERBOSE: ${{ inputs.verbose }}
|
||||||
CC_VERSION: ${{ inputs.version }}
|
CC_VERSION: ${{ inputs.version }}
|
||||||
CC_YML_PATH: ${{ inputs.codecov_yml_path }}
|
CC_YML_PATH: ${{ inputs.codecov_yml_path }}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue