How can I make my workflow fail if the quality gate fails? (Main Branch)

My Setup:

I would like to make the whole workflow file fail as soon as the quality gate fails. I basically do not want to use Pull Requests but still have the code not deployed if the quality gate fails. Is it possible to maybe have the Github Action of Sonarcloud (SonarSource/sonarcloud-github-action@master) fail if the quality gate fails?

Hey there.

You should be able to make the pipeline fail by adding sonar.qualitygate.wait=true to your pipeline (either in your file or as an argument).

If your deployment relies on this being pipeline being successful, it should succeed in stopping the deployment.