Compare commits

...

2 Commits

Author SHA1 Message Date
Tom Hu
637f5001b4 fix: update CODECOV_TOKEN if set with env 2024-11-20 14:56:42 -05:00
Tom Hu
eea0d176b1 fix: add space 2024-11-20 14:52:57 -05:00

View File

@@ -173,6 +173,9 @@ runs:
# {"count":1984,"value":"***"} # {"count":1984,"value":"***"}
CC_TOKEN=$(curl -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=https://codecov.io" | cut -d\" -f6) CC_TOKEN=$(curl -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=https://codecov.io" | cut -d\" -f6)
echo "CC_TOKEN=$CC_TOKEN" >> "$GITHUB_ENV" echo "CC_TOKEN=$CC_TOKEN" >> "$GITHUB_ENV"
elif [ -n "${{ env.CODECOV_TOKEN }}" ];
then
echo "CC_TOKEN=${{ env.CODECOV_TOKEN }}" >> "$GITHUB_ENV"
else else
if [ -n ${{ inputs.token }} ]; if [ -n ${{ inputs.token }} ];
then then
@@ -184,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_REPO_FULL_NAME" ] && [ "${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"