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 24
24
SONARCLOUD_HOST : https://sonarcloud.io
25
25
26
26
jobs :
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
+
27
38
sonar :
28
39
name : SonarCloud Scan
29
40
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 }}
31
43
steps :
32
44
- uses : actions/checkout@v4
33
45
with :
You can’t perform that action at this time.
0 commit comments