[PM-16208] chore(ci): Split scan workflow for protected branches and migrate to new sonarqube action (#4489)

This commit is contained in:
Álison Fernandes
2024-12-18 23:49:41 +00:00
committed by GitHub
parent f6bd467ec8
commit b615bfa664
2 changed files with 62 additions and 8 deletions

View File

@@ -1,12 +1,7 @@
name: Scan
name: Scan Pull Requests
on:
workflow_dispatch:
push:
branches:
- "main"
- "rc"
- "hotfix-rc"
pull_request_target:
types: [opened, synchronize]
merge_group:
@@ -68,10 +63,9 @@ jobs:
ref: ${{ github.event.pull_request.head.sha }}
- name: Scan with SonarCloud
uses: sonarsource/sonarcloud-github-action@02ef91109b2d589e757aefcfb2854c2783fd7b19 # v4.0.0
uses: sonarsource/sonarqube-scan-action@bfd4e558cda28cda6b5defafb9232d191be8c203 # v4.2.1
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: >
-Dsonar.organization=${{ github.repository_owner }}