File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff 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 }}" ]; 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments