lfreleng-actions/🔐 SonarCube Cloud Scan

Performs a SonarQube Cloud scan and uploads the results

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Activelast commit Jul 8, 2026
License
None

Pinned Snippet

workflow.ymlSHA-pinned
uses: lfreleng-actions/sonarqube-cloud-scan-action@6138cf1252b714849809c85854a576974f6436f2 # v1.1.1

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
sonar_tokenSonarQube API key/tokenyes
no_checkoutDo not checkout local repository; used for testingnofalse
sonar_root_certServer root certificate PEM encodedno
build_wrapper_urlHTTPS download location of build wrapper/scriptno
build_wrapper_out_dirFilesystem location of build outputsno
prescan_script_urlHTTPS 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_urlUploads scans to the given host URLnohttps://sonarcloud.io
lc_allChange when code character set is outside the range of en_US.UTF-8noen_US.UTF-8
debugEnable debugging outputnofalse
github_tokenGitHub token for API access (optional, improves metadata accuracy)no""
project_base_dirSet the sonar.projectBaseDir analysis propertyno.
scanner_versionVersion of the Sonar Scanner CLI to useno
skip_jre_provisioningSkip JRE auto-provisioning by the Sonar Scanner CLInofalse
argsArguments to pass to the Sonar Scanner CLI (e.g., "-Dsonar.verbose=true")no-Dsonar.scanner.cache.enabled=false
sonar_organizationOverride the SonarQube organization (sonar.organization)no""
sonar_project_keyOverride the SonarQube project key (sonar.projectKey)no""
sonar_branch_nameAnalysis branch name (sonar.branch.name); useful for Gerrit decorationno""
sonar_branch_targetAnalysis target branch (sonar.branch.target); useful for Gerrit decorationno""
wait_for_quality_gatePoll the SonarQube quality gate after the analysis task completesnofalse
fail_on_quality_gateFail 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)nofalse
namedescription
sonar_orgSonarQube organization
project_keySonarQube project key
config_filePath to SonarQube configuration file
dashboard_urlSonarQube dashboard URL for the analysed project
quality_gate_statusQuality gate status (OK, ERROR, NONE, or UNKNOWN)