Kosta
(Kostiantyn )
October 27, 2023, 10:59am
1
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
ganncamp
(G Ann Campbell)
October 30, 2023, 2:31pm
2
Hi,
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.
HTH,
Ann
Kosta
(Kostiantyn )
October 31, 2023, 12:25pm
3
Thanks for reply Ann!
Here in the examples, I can only see Ubuntu is specified
# Scan your code with SonarQube [](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!
<img src="./images/SonarQube-72px.png">
SonarQube is the leading product for Continuous Code Quality and code Security. It supports most popular programming languages, including Java, JavaScript, TypeScript, C#, Python, C, C++, and many more.
## Requirements
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/).
## Usage
Project metadata, including the location to the sources to be analyzed, must be declared in the file `sonar-project.properties` in the base directory:
```properties
sonar.projectKey=<replace with the key generated when setting up the project on SonarQube>
This file has been truncated. show original
ganncamp
(G Ann Campbell)
October 31, 2023, 3:12pm
4
Hi,
That’s an example.
Have you tried this on Windows?
Ann
Kosta
(Kostiantyn )
October 31, 2023, 3:54pm
5
Hi Ann,
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.
Kosta
Kosta
(Kostiantyn )
November 2, 2023, 3:58pm
6
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."
1 Like