File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 2626 download-if-workflow-run :
2727 runs-on : ubuntu-latest
2828 outputs :
29- pr_number : ${{ steps.pr_output.outputs.pr_number }}
30- pr_sha : ${{ steps.pr_output.outputs.pr_sha }}
29+ pr_number : ${{ steps.pr_output.outputs.pr_number || steps.pr_output_target.outputs.pr_number }}
30+ pr_sha : ${{ steps.pr_output.outputs.pr_sha || steps.pr_output_target.outputs.pr_sha }}
3131 # if conditions on all individual steps because subsequent jobs depend on this job
3232 # and we cannot skip it entirely
3333 steps :
4141 path : pr/
4242 search_artifacts : true
4343
44- - name : ' Determine PR info'
44+ - name : ' Determine PR info from workflow_run '
4545 # PR info comes from the artifact if downloaded, or GitHub context if not.
4646 if : github.event_name == 'workflow_run'
4747 id : ' pr_output'
5656 echo "pr_number=$(cat pr/pr_number)" >> "$GITHUB_OUTPUT"
5757 echo "pr_sha=$(cat pr/pr_sha)" >> "$GITHUB_OUTPUT"
5858
59+ - name : ' Get PR info from pull_request_target event'
60+ if : github.event_name == 'pull_request_target'
61+ id : ' pr_output_target'
62+ run : |
63+ echo "pr_number=${{ github.event.pull_request.number }}" >> "$GITHUB_OUTPUT"
64+ echo "pr_sha=${{ github.event.pull_request.head.sha }}" >> "$GITHUB_OUTPUT"
65+
5966 validate-pr :
6067 # Necessary to have sufficient permissions to write to the PR
6168 permissions :
You can’t perform that action at this time.
0 commit comments