Create sonarqube.yml

Signed-off-by: sairam-bathini <146484884+sairam-bathini@users.noreply.github.com>
This commit is contained in:
sairam-bathini 2025-06-28 11:46:20 +05:30 committed by GitHub
parent c5af32d5a1
commit 0d8fd6b25d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

30
.github/workflows/sonarqube.yml vendored Normal file
View file

@ -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=.