diff --git a/.github/workflows/sonarqube-analysis.yml b/.github/workflows/sonarqube-analysis.yml new file mode 100644 index 0000000..324ba29 --- /dev/null +++ b/.github/workflows/sonarqube-analysis.yml @@ -0,0 +1,31 @@ +name: SonarQube Analysis + +on: + pull_request: + push: + branches: ["**"] + +jobs: + build: + name: Run SonarQube Analysis + runs-on: self-hosted + + steps: + - uses: actions/checkout@v5 + with: + fetch-depth: 0 + + - name: SonarQube Scan + uses: sonarsource/sonarqube-scan-action@v6 + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} + + - name: SonarQube Quality Gate check + id: sonarqube-quality-gate-check + uses: sonarsource/sonarqube-quality-gate-action@v1.2.0 + with: + pollingTimeoutSec: 600 + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..14a8971 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1 @@ +sonar.projectKey=AltaPay_sdk-ruby_b470675d-c4dc-4e5a-82b2-f4295fbe59f5