File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 2424 SONARCLOUD_HOST : https://sonarcloud.io
2525
2626jobs :
27+ token-check :
28+ runs-on : ubuntu-latest
29+ outputs :
30+ hasToken : ${{ steps.check-token.outputs.has }}
31+ steps :
32+ - id : check-token
33+ run : |
34+ [ -z $SONAR_TOKEN ] && echo "has=false" || echo "has=true" >> "$GITHUB_OUTPUT"
35+ env :
36+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
37+
2738 sonar :
2839 name : SonarCloud Scan
2940 runs-on : ubuntu-latest
30- if : ${{ !(github.event_name == 'pull_request' && startsWith(github.head_ref, 'renovate/')) && secrets.SONAR_TOKEN != '' }}
41+ needs : token-check
42+ if : ${{ !(github.event_name == 'pull_request' && startsWith(github.head_ref, 'renovate/')) && needs.token-check.outputs.hasToken }}
3143 steps :
3244 - uses : actions/checkout@v4
3345 with :
You can’t perform that action at this time.
0 commit comments