name: Sonar permissions: contents: read pull-requests: write on: push: branches: - production pull_request: branches: - production types: [opened, synchronize, reopened] jobs: sonarqube: name: SonarQube runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - name: SonarQube Scan uses: SonarSource/sonarqube-scan-action@v6 env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}