Skip to content

Analyze with SonarCloud

Actions
An opinionated action that downloads SonarCloud quality profiles and prepares your project for SonarScanner for .NET
v2.0.0
Latest
Star (0)

Analyze with SonarCloud

Uses the SonarScanner for .NET tool to hook into the build pipeline, downloads SonarCloud quality profiles and settings, and prepares your project for analysis.

This action is part of the Codebelt umbrella and ensures a consistent way of:

  • Defining your CI/CD pipeline
  • Structuring your repository
  • Keeping your codebase small and feasible
  • Writing clean and maintainable code
  • Deploying your code to different environments
  • Automating as much as possible

A paved path to excel as a DevSecOps Engineer.

Usage

To use this action in your GitHub repository, you can follow these steps:

uses: codebeltnet/sonarcloud-scan@v1

Inputs

with:
  # The SonarCloud generated token.
  token:
  # The key of your project in SonarCloud.
  projectKey:
  # The name of your organization in SonarCloud.
  organization:
  # The version of your project, e.g. 1.0.0.
  version:
  # The host URL of your SonarCloud instance.
  host: 'https://sonarcloud.io'
  # Additional properties to be passed to the scanner.
  parameters: >-
    -d:sonar.exclusions='**/obj/**,**/bin/**'

Outputs

This action has no outputs.

Examples

Prepare SonarCloud

steps:
  - name: Run SonarCloud Analysis
    uses: codebeltnet/sonarcloud-scan@v1
    with:
      token: ${{ secrets.SONAR_TOKEN }}
      organization: geekle
      projectKey: savvyio
      version: ${{ needs.build.outputs.version }}

Caller workflows to showcase the Codebelt experience

Basic CI/CD Pipeline

Intermediate CI/CD Pipeline

Advanced CI/CD Pipeline

Contributing to Analyze with SonarCloud from Codebelt

Contributions are welcome! Feel free to submit issues, feature requests, or pull requests to help improve this action.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Tip

To learn more about the Codebelt experience and offerings, visit our organization page on GitHub.

Analyze with SonarCloud is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

An opinionated action that downloads SonarCloud quality profiles and prepares your project for SonarScanner for .NET
v2.0.0
Latest

Analyze with SonarCloud is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.