File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -230,6 +230,17 @@ jobs:
230
230
printf '### Failed as git reported modified and/or untracked files\n```\n%s\n```\n' "$(git status -s)" | tee -a "$GITHUB_STEP_SUMMARY"
231
231
exit 99
232
232
fi
233
+
234
+ - name : SonarCloud Scan
235
+ uses : SonarSource/sonarqube-scan-action@v5
236
+ # Tun sonar only for lint job if sonar config is present or sonar key
237
+ # being present. This ensures that we fail the build if is misconfigured
238
+ # but we do skip the step for projects that do not use sonar.
239
+ if : matrix.name == 'lint' && (hashFiles('sonar-project.properties') != '' || env.SONAR_TOKEN != '') # 'if' cannot use 'secrets' context
240
+ env :
241
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
242
+ SONAR_TOKEN : ${{ secrets.CICD_ORG_SONAR_TOKEN_CICD_BOT }}
243
+
233
244
# https://github.com/actions/toolkit/issues/193
234
245
check :
235
246
if : always()
You can’t perform that action at this time.
0 commit comments