Skip to content

Commit 277db52

Browse files
fix: update statment (#1726)
1 parent c77245a commit 277db52

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

action.yml

+5-4
Original file line numberDiff line numberDiff line change
@@ -168,12 +168,13 @@ runs:
168168
- name: Set fork
169169
shell: bash
170170
run: |
171-
if [ -n "$GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FULL_NAME" ] && [ "${GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FULL_NAME}" != "$GITHUB_REPOSITORY" ];
171+
CC_FORK="false"
172+
if [ -n "$GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FULL_NAME" ] && [ "$GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FULL_NAME" != "$GITHUB_REPOSITORY" ];
172173
then
173174
echo -e "\033[0;32m==>\033[0m Fork detected"
174175
CC_FORK="true"
175-
echo "CC_FORK=$CC_FORK" >> "$GITHUB_ENV"
176176
fi
177+
echo "CC_FORK=$CC_FORK" >> "$GITHUB_ENV"
177178
env:
178179
GITHUB_EVENT_PULL_REQUEST_HEAD_LABEL: ${{ github.event.pull_request.head.label }}
179180
GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FULL_NAME: ${{ github.event.pull_request.head.repo.full_name }}
@@ -183,10 +184,10 @@ runs:
183184
- name: Get and set token
184185
shell: bash
185186
run: |
186-
if [ "${{ inputs.use_oidc }}" == 'true' && "$CC_FORK" != 'true' ];
187+
if [ "${{ inputs.use_oidc }}" == 'true' ] && [ "$CC_FORK" != 'true' ];
187188
then
188189
# {"count":1984,"value":"***"}
189-
echo -e "\033[0;32m==>\033[0m Requesting OIDC token from ${ACTION_ID_TOKEN_REQUEST_URL}"
190+
echo -e "\033[0;32m==>\033[0m Requesting OIDC token from '$ACTIONS_ID_TOKEN_REQUEST_URL'"
190191
CC_TOKEN=$(curl -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=https://codecov.io" | cut -d\" -f6)
191192
echo "CC_TOKEN=$CC_TOKEN" >> "$GITHUB_ENV"
192193
elif [ -n "${{ env.CODECOV_TOKEN }}" ];

0 commit comments

Comments
 (0)