Skip to content

Commit

Permalink
fix: update statment
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasrockhu-codecov committed Dec 18, 2024
1 parent c77245a commit c02c960
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,13 @@ runs:
- name: Set fork
shell: bash
run: |
if [ -n "$GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FULL_NAME" ] && [ "${GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FULL_NAME}" != "$GITHUB_REPOSITORY" ];
CC_FORK="false"
if [ -n "$GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FULL_NAME" ] && [ "$GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FULL_NAME" != "$GITHUB_REPOSITORY" ];
then
echo -e "\033[0;32m==>\033[0m Fork detected"
CC_FORK="true"
echo "CC_FORK=$CC_FORK" >> "$GITHUB_ENV"
fi
echo "CC_FORK=$CC_FORK" >> "$GITHUB_ENV"
env:
GITHUB_EVENT_PULL_REQUEST_HEAD_LABEL: ${{ github.event.pull_request.head.label }}
GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FULL_NAME: ${{ github.event.pull_request.head.repo.full_name }}
Expand All @@ -183,7 +184,7 @@ runs:
- name: Get and set token
shell: bash
run: |
if [ "${{ inputs.use_oidc }}" == 'true' && "$CC_FORK" != 'true' ];
if [ "${{ inputs.use_oidc }}" == 'true' ] && [ "$CC_FORK" != 'true' ];
then
# {"count":1984,"value":"***"}
echo -e "\033[0;32m==>\033[0m Requesting OIDC token from ${ACTION_ID_TOKEN_REQUEST_URL}"
Expand Down

0 comments on commit c02c960

Please sign in to comment.