Sonar-scanner: command not found

We are getting this error when running the action:

/ line 35: sonar-scanner: command not found
  ❌  Failure - Main SonarQube scan
exit with `FAILURE`: 127

This was already reported on github:

Dear @MazueraAlvaro,

thanks for posting in our community and proposing a fix. We were trying to reproduce the issue, but we failed at that. I’ll be more specific…

  • We defined a github workflow in a private GH project and trigger the analysis on a local SonarQube instance accessible from the internet.
  • We just built locally the Dockerfile available in the repository and run it.

In both cases, we did not face any errors like that one you are reporting.

May I ask you to share the github workflow definition (e.g., build.xml) you are using to trigger your GH action?