lfreleng-actions/🔐 SonarCube Cloud Scan
Performs a SonarQube Cloud scan and uploads the results
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Activelast commit Jul 8, 2026
- License
- None
Pinned Snippet
uses: lfreleng-actions/sonarqube-cloud-scan-action@6138cf1252b714849809c85854a576974f6436f2 # v1.1.1tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| sonar_token | SonarQube API key/token | yes | — |
| no_checkout | Do not checkout local repository; used for testing | no | false |
| sonar_root_cert | Server root certificate PEM encoded | no | — |
| build_wrapper_url | HTTPS download location of build wrapper/script | no | — |
| build_wrapper_out_dir | Filesystem location of build outputs | no | — |
| prescan_script_url | HTTPS URL of a script to download and execute with bash after checkout but before the scan, WITHOUT the C/C++ build wrapper. Use for languages (Go, Python, ...) that need a pre-scan step such as generating a coverage report, but must not be wrapped by build-wrapper. Must use HTTPS and is mutually exclusive with build_wrapper_url. | no | — |
| sonar_host_url | Uploads scans to the given host URL | no | https://sonarcloud.io |
| lc_all | Change when code character set is outside the range of en_US.UTF-8 | no | en_US.UTF-8 |
| debug | Enable debugging output | no | false |
| github_token | GitHub token for API access (optional, improves metadata accuracy) | no | "" |
| project_base_dir | Set the sonar.projectBaseDir analysis property | no | . |
| scanner_version | Version of the Sonar Scanner CLI to use | no | — |
| skip_jre_provisioning | Skip JRE auto-provisioning by the Sonar Scanner CLI | no | false |
| args | Arguments to pass to the Sonar Scanner CLI (e.g., "-Dsonar.verbose=true") | no | -Dsonar.scanner.cache.enabled=false |
| sonar_organization | Override the SonarQube organization (sonar.organization) | no | "" |
| sonar_project_key | Override the SonarQube project key (sonar.projectKey) | no | "" |
| sonar_branch_name | Analysis branch name (sonar.branch.name); useful for Gerrit decoration | no | "" |
| sonar_branch_target | Analysis target branch (sonar.branch.target); useful for Gerrit decoration | no | "" |
| wait_for_quality_gate | Poll the SonarQube quality gate after the analysis task completes | no | false |
| fail_on_quality_gate | Fail the action when the quality gate status is not OK. Requires wait_for_quality_gate: true, and takes effect only when the gate can actually be evaluated (skipped without failing when jq, the report task file, ceTaskUrl, serverUrl, or a valid sonar_token are missing) | no | false |
Outputs
| name | description |
|---|---|
| sonar_org | SonarQube organization |
| project_key | SonarQube project key |
| config_file | Path to SonarQube configuration file |
| dashboard_url | SonarQube dashboard URL for the analysed project |
| quality_gate_status | Quality gate status (OK, ERROR, NONE, or UNKNOWN) |