How to get sonar analysis report published on github actions job logs?

  • ALM used (GitHub)
  • CI system used (GitHub Actions)
  • Languages of the repository (Java)

I am using SonarCloud with GitHub Actions.and we are able to execute and analyse gradle build job. In the git hub action logs we could see that reports are published using sonar url (for example: ANALYSIS SUCCESSFUL, you can find the results at: https://sonarcloud.io/dashboard?

I was wondering if there is a way or workaround to fetch this analysis report and view them as part of build logs itself in github rather than checking our the URL .

Any help or suggestion would be highly appreciated. Thank you

Hello @ranjithkumar,

Happy New Year 2022 !
What you ask is not possible on branches. You may have noticed that for pull requests (if you use pull request) there is a decoration in GitHub like this PR
We have this on PRs because, on PRs, GitHub offers a built-in review process that allow to post comments or checks on the PR.
AFAIK GitHub does not provide any way to comment/annotate on a branch so there is no way to post anything about SonarCloud scan results on branches

Olivier