Project not found, need to check sonar.projectKey and sonar.organization

hi there

I got this error from a sonarcloud analyze in github action triggered by pull request. The following is the github action content:

it’s weird that triggered in nightly build with same command or trigger the action mannually it works.

this is the full error :

Error:  Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin: (default-cli) on project shardingsphere: Project not found. Please check the 'sonar.projectKey' and 'sonar.organization' properties, the 'SONAR_TOKEN' environment variable, or contact the project administrator -> [Help 1]


I would look first to make sure SONAR_TOKEN is being properly populated into the environment. That’s if you’re already sure that sonar.projectKey and sonar.organization are being properly set.