Fix missing SonarCloud decorator in PR when triggering GH workflow for py3.9 (#6220)

This commit is contained in:
Nahuel 2022-07-20 10:28:18 +02:00 committed by GitHub
parent 1e1f5d4e8e
commit dfb017008b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -77,8 +77,26 @@ jobs:
# fix coverage xml report for github
sed -i 's/src\/metadata/\/github\/workspace\/ingestion\/src\/metadata/g' ingestion/ci-coverage.xml
- name: Push Results to Sonar
# we have to pass these args values since we are working with the 'pull_request_target' trigger
- name: Push Results in PR to Sonar
uses: sonarsource/sonarcloud-github-action@master
if: ${{ github.event_name == 'pull_request_target' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.INGESTION_SONAR_SECRET }}
with:
projectBaseDir: ingestion/
args: >
-Dproject.settings=ingestion/sonar-project.properties
-Dsonar.pullrequest.key=${{ github.event.pull_request.number }}
-Dsonar.pullrequest.branch=${{ github.head_ref }}
-Dsonar.pullrequest.github.repository=OpenMetadata
-Dsonar.scm.revision=${{ github.event.pull_request.head.sha }}
-Dsonar.pullrequest.provider=github
- name: Push Results to Sonar
uses: sonarsource/sonarcloud-github-action@master
if: ${{ github.event_name == 'push' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.INGESTION_SONAR_SECRET }}