struts
struts copied to clipboard
Always run Sonar scan against the master branch
I think we need to check the branch name (github.ref
) and PR target branch (github.base_ref
), and if either of those match 'master', run the workflow else skip it
It would also be nice if the step "SonarCloud / Scan (push)" in the master of forked projects is skipped, as this always fails otherwise.
Error: Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:4.0.0.4121:sonar (default-cli) on project struts2-parent: Project not found. Please check the 'sonar.projectKey' and 'sonar.organization' properties, the 'SONAR_TOKEN' environment variable, or contact the project administrator to check the permissions of the user the token belongs to