diff --git a/.gitea/workflows/sonar.yml b/.gitea/workflows/sonar.yml new file mode 100644 index 0000000..78da169 --- /dev/null +++ b/.gitea/workflows/sonar.yml @@ -0,0 +1,21 @@ +on: + push: + branches: + - main + pull_request: + types: [opened, synchronize, reopened] +name: SonarQube Scan +jobs: + sonarqube: + name: SonarQube Trigger + runs-on: ubuntu-latest + steps: + - name: Checking out + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: SonarQube Scan + uses: kitabisa/sonarqube-action@v1.2.0 + with: + host: ${{ secrets.SONARQUBE_HOST }} + login: ${{ secrets.SONARQUBE_TOKEN }} diff --git a/TestSonarqube.sln b/TestSonarqube.sln index 5604b21..73ac264 100644 --- a/TestSonarqube.sln +++ b/TestSonarqube.sln @@ -10,6 +10,7 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{9AB7403F-27F5-4E37-A3CB-1CF6091DCACA}" ProjectSection(SolutionItems) = preProject build.yml = build.yml + sonar.yml = sonar.yml EndProjectSection EndProject Global