Skip to content

Commit 8fb9fa8

Browse files
Add SonarCloud Job Summary to Actions workflow (#62)
* Initial plan * Add SonarCloud Job Summary step to sonarcloud.yml Agent-Logs-Url: https://github.com/304NotModified/SLNX-validator/sessions/317ec9e9-0ffd-4326-9b98-20c4631bca49 Co-authored-by: 304NotModified <5808377+304NotModified@users.noreply.github.com> * Link SonarCloud summary to PR-specific URL when running on a PR Agent-Logs-Url: https://github.com/304NotModified/SLNX-validator/sessions/ec89ba65-bd0b-4668-962b-fd975edbc6a1 Co-authored-by: 304NotModified <5808377+304NotModified@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: 304NotModified <5808377+304NotModified@users.noreply.github.com>
1 parent 6e42d47 commit 8fb9fa8

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

.github/workflows/sonarcloud.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,16 @@ jobs:
5454
env:
5555
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
5656
run: dotnet sonarscanner end /d:sonar.token="${SONAR_TOKEN}"
57+
58+
- name: SonarCloud summary
59+
if: always()
60+
env:
61+
PR_NUMBER: ${{ github.event.pull_request.number }}
62+
run: |
63+
echo "## 🔍 SonarCloud Analysis" >> $GITHUB_STEP_SUMMARY
64+
echo "" >> $GITHUB_STEP_SUMMARY
65+
if [ -n "$PR_NUMBER" ]; then
66+
echo "View full results: [sonarcloud.io/summary/new_code?id=slnx-validator&pullRequest=${PR_NUMBER}](https://sonarcloud.io/summary/new_code?id=slnx-validator&pullRequest=${PR_NUMBER})" >> $GITHUB_STEP_SUMMARY
67+
else
68+
echo "View full results: [sonarcloud.io/project/overview?id=slnx-validator](https://sonarcloud.io/project/overview?id=slnx-validator)" >> $GITHUB_STEP_SUMMARY
69+
fi

0 commit comments

Comments
 (0)