fix: Trigger workflow on Pull Requests (#19970)

* fix: Trigger workflow  on Pull Requests

* chore: Use the latest action step for workflow dispatch
This commit is contained in:
Akash Jain 2025-02-26 10:17:29 +00:00 committed by GitHub
parent 9568817cf1
commit 19f04a35ef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -28,6 +28,11 @@ on:
- "yarn.lock"
- "Makefile"
- "bootstrap/**"
pull_request_target:
types: [opened, synchronize, labeled]
paths:
- "openmetadata-service/**"
- "openmetadata-spec/src/main/resources/json/schema/**"
permissions:
contents: read
@ -59,12 +64,12 @@ jobs:
disable-reviews: true # To not auto approve changes
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Trigger Collate build & wait
uses: aurelien-baudet/workflow-dispatch@v2
uses: the-actions-org/workflow-dispatch@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SHA: ${{ github.event_name == 'push' && github.event.after || github.event.pull_request.head.sha }}
@ -74,4 +79,4 @@ jobs:
repo: open-metadata/openmetadata-collate
token: ${{ secrets.COLLATE_PAT }}
wait-for-completion: true
inputs: '{ "sha": "${{ env.SHA }}" }'
inputs: '{ "sha": "${{ env.SHA }}", "event": "${{ github.event_name }}" }'