From 0d8fd6b25d53deb7e74661f0e000959346369405 Mon Sep 17 00:00:00 2001 From: sairam-bathini <146484884+sairam-bathini@users.noreply.github.com> Date: Sat, 28 Jun 2025 11:46:20 +0530 Subject: [PATCH] Create sonarqube.yml Signed-off-by: sairam-bathini <146484884+sairam-bathini@users.noreply.github.com> --- .github/workflows/sonarqube.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/sonarqube.yml diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml new file mode 100644 index 000000000..3db728622 --- /dev/null +++ b/.github/workflows/sonarqube.yml @@ -0,0 +1,30 @@ +name: SonarQube analysis + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + workflow_dispatch: + +permissions: + pull-requests: read + +jobs: + Analysis: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Analyze with SonarQube + uses: SonarSource/sonarqube-scan-action@7295e71c9583053f5bf40e9d4068a0c974603ec8 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} + with: + args: > + -Dsonar.projectKey=github-actions-test + -Dsonar.sources=.