Are SonarQube GitHub actions are supported on the onpremise windows self hosted or only on the Ubuntu as it is specified in the examples?
About self-hosted runners - GitHub Docs
Welcome to the community!
You’ve linked to GitHub’s docs about runners. We can’t answer questions about what GitHub does or does not support. If you’re asking whether analysis runs only on Ubuntu, the answer is no. Generally, analysis runs anywhere Java does.
Thanks for reply Ann!
Here in the examples, I can only see Ubuntu is specified
This file has been truncated.
# Scan your code with SonarQube [![QA](https://github.com/SonarSource/sonarqube-scan-action/actions/workflows/qa.yml/badge.svg)](https://github.com/SonarSource/sonarqube-scan-action/actions/workflows/qa.yml)
Using this GitHub Action, achieve [Clean Code](https://www.sonarsource.com/solutions/clean-code/?utm_medium=referral&utm_source=github&utm_campaign=clean-code&utm_content=sonarqube-scan-action) with [SonarQube](https://www.sonarqube.org/) by scanning to detect Bugs, Vulnerabilities, and Code Smells in 30+ programming languages!
To run an analysis on your code, you first need to set up your project on SonarQube. Your SonarQube instance must be accessible from GitHub, and you will need an access token to run the analysis (more information below under **Environment variables**).
Read more information on how to analyze your code [here](https://docs.sonarqube.org/latest/analysis/github-integration/).
Project metadata, including the location to the sources to be analyzed, must be declared in the file `sonar-project.properties` in the base directory:
sonar.projectKey=<replace with the key generated when setting up the project on SonarQube>
That’s an example.
Have you tried this on Windows?
No, I have not tried yet, as we would need to provision build server for that.
If it is supported we can give it a try.
We do not have server for GitHub actions yet, but most likely actions on Windows Runners will fail. SonarQube GithHub action is Dockerfile type as seen here:
sonarqube-scan-action/Dockerfile at master · SonarSource/sonarqube-scan-action (github.com)
GitHub documentation states:
" If you want to run workflows that use Docker container actions or service containers, you must use a Linux machine and Docker must be installed."