diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml index 3dc553a5..12ab2326 100644 --- a/.github/workflows/sonarqube.yml +++ b/.github/workflows/sonarqube.yml @@ -2,9 +2,11 @@ name: Static code analysis on: workflow_dispatch: + # push: + # branches: ["main", "release/**", "feature/**", "fix/**"] pull_request: types: [opened, synchronize, reopened] - # branches: ["next", "main", "release/**", "feature/**", "fix/**"] + branches: ["next", "main", "release/**", "feature/**", "fix/**"] jobs: code-analysis: @@ -54,17 +56,17 @@ jobs: - name: Build, Test and Analyze env: - SONAR_TOKEN_AS: ${{ secrets.SONAR_TOKEN_AS }} + SONAR_TOKEN_AS: ${{ secrets.SONAR_TOKEN }} run: | dotnet-sonarscanner begin \ - /k:"as2024ad_sfsw" \ - /o:"as2024ad" \ + /k:"DFE-Digital_childrens-social-care-cpd" \ + /o:"dfe-digital" \ /d:sonar.qualitygate.wait=true \ /d:sonar.cs.vscoveragexml.reportsPaths=coverage.xml \ /d:sonar.exclusions="**/*.css,**/*.scss,**/Models/*,**/Program.cs,**/WebApplicationBuilderExtensions.cs,**/GraphQL/Queries/*,**/Contentful-Schema/migrations/*.cjs" \ /d:sonar.test.exclusions="Childrens-Social-Care-CPD-Tests/**/*,Terraform-bootstrap/Error-pages/*" \ - /d:sonar.token="${{ secrets.SONAR_TOKEN_AS }}" \ + /d:sonar.token="${{ secrets.SONAR_TOKEN }}" \ /d:sonar.host.url="https://sonarcloud.io" dotnet build --no-incremental dotnet-coverage collect --settings dotnet-cover-config.xml -f xml -o coverage.xml "dotnet test" - dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN_AS }}" + dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"