mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-30 11:56:01 +00:00
fix: Ability to run CI from forked Repository (#3874)
* Ability to run CI from forked Repository * Update yarn-coverage.yml
This commit is contained in:
parent
63533eb388
commit
954bbca383
7
.github/workflows/yarn-coverage.yml
vendored
7
.github/workflows/yarn-coverage.yml
vendored
@ -8,7 +8,7 @@ on:
|
||||
- main
|
||||
paths:
|
||||
- openmetadata-ui/src/main/resources/ui/**
|
||||
pull_request:
|
||||
pull_request_target:
|
||||
types: [opened, synchronize, reopened]
|
||||
paths:
|
||||
- openmetadata-ui/src/main/resources/ui/**
|
||||
@ -23,6 +23,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
# Disabling shallow clone is recommended for improving relevancy of reporting
|
||||
fetch-depth: 0
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
@ -41,7 +42,7 @@ jobs:
|
||||
run: npm install -g sonarqube-scanner
|
||||
id: npm_install_sonar_scanner
|
||||
- name: SonarCloud Scan On PR
|
||||
if: github.event_name == 'pull_request' && steps.npm_install_sonar_scanner.outcome == 'success'
|
||||
if: github.event_name == 'pull_request_target' && steps.npm_install_sonar_scanner.outcome == 'success'
|
||||
working-directory: ${{ env.UI_WORKING_DIRECTORY }}
|
||||
run: |
|
||||
sonar-scanner -Dsonar.host.url=${SONARCLOUD_URL} \
|
||||
@ -65,4 +66,4 @@ jobs:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
SONAR_TOKEN: ${{ secrets.UI_SONAR_TOKEN }}
|
||||
SONARCLOUD_URL: https://sonarcloud.io
|
||||
SONARCLOUD_URL: https://sonarcloud.io
|
||||
|
Loading…
x
Reference in New Issue
Block a user