11name : Pull Request Validation
22
33on :
4- pull_request :
4+ pull_request_target :
55 types :
66 - opened
77 - synchronize
88 - reopened
99 - labeled
1010
1111concurrency :
12- group : ${{ github.workflow }}-pr-${{ github.event.pull_request .number }}
12+ group : ${{ github.workflow }}-pr-${{ github.event.pull_request_target .number }}
1313 cancel-in-progress : true
1414
1515jobs :
3232 with :
3333 platform : ' linux/amd64'
3434 target : ' test'
35- tags : ' nv-ingest:pr-${{ github.event.pull_request .number }}'
35+ tags : ' nv-ingest:pr-${{ github.event.pull_request_target .number }}'
3636 base-image : ' ubuntu'
3737 base-image-tag : ' jammy-20250415.1'
3838 test-selection : ' full'
4545 # Library mode integration tests (requires approval for external contributors)
4646 library-mode-check-access :
4747 name : Check Library Mode Test Access
48+ if : github.event_name == 'pull_request_target'
4849 runs-on : ubuntu-latest
4950 outputs :
5051 has-access : ${{ steps.check.outputs.has-access }}
@@ -53,23 +54,25 @@ jobs:
5354 id : check
5455 run : |
5556 HAS_ACCESS="false"
56- if [[ "${{ github.event.pull_request .author_association }}" == "MEMBER" ]] || \
57- [[ "${{ github.event.pull_request .author_association }}" == "COLLABORATOR" ]] || \
58- [[ "${{ github.event.pull_request .author_association }}" == "OWNER" ]] || \
59- [[ "${{ contains(github.event.pull_request .labels.*.name, 'ok-to-test') }}" == "true" ]]; then
57+ if [[ "${{ github.event.pull_request_target .author_association }}" == "MEMBER" ]] || \
58+ [[ "${{ github.event.pull_request_target .author_association }}" == "COLLABORATOR" ]] || \
59+ [[ "${{ github.event.pull_request_target .author_association }}" == "OWNER" ]] || \
60+ [[ "${{ contains(github.event.pull_request_target .labels.*.name, 'ok-to-test') }}" == "true" ]]; then
6061 HAS_ACCESS="true"
6162 fi
6263 echo "has-access=$HAS_ACCESS" >> $GITHUB_OUTPUT
6364
6465 library-mode-test :
6566 name : Test Library Mode
6667 needs : library-mode-check-access
67- if : needs.library-mode-check-access.outputs.has-access == 'true'
68+ if : |
69+ github.event_name == 'pull_request_target' &&
70+ needs.library-mode-check-access.outputs.has-access == 'true'
6871 uses : ./.github/workflows/reusable-integration-test.yml
6972 with :
7073 runner : ' ubuntu-latest'
7174 timeout-minutes : 60
72- source-ref : ${{ github.event.pull_request .head.sha }}
75+ source-ref : ${{ github.event.pull_request_target .head.sha }}
7376 secrets :
7477 AUDIO_FUNCTION_ID : ${{ secrets.AUDIO_FUNCTION_ID }}
7578 EMBEDDING_NIM_MODEL_NAME : ${{ secrets.EMBEDDING_NIM_MODEL_NAME }}
0 commit comments