Make PR based docker and pypi workflow work for forked PR (#18720)

This commit is contained in:
Kangyan-Zhou
2026-02-12 21:05:17 +08:00
committed by GitHub
parent f3656432c7
commit f116b3a51b
2 changed files with 4 additions and 12 deletions
+2 -6
View File
@@ -4,11 +4,7 @@ on:
workflow_dispatch:
inputs:
pr_number:
description: 'PR number to build from'
required: true
type: string
pr_branch:
description: 'PR branch name to build from (e.g., my-feature-branch or refs/pull/123/head)'
description: 'PR number to build from (works with both internal and fork PRs)'
required: true
type: string
@@ -43,7 +39,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ inputs.pr_branch }}
ref: refs/pull/${{ inputs.pr_number }}/head
- name: Free disk space
uses: jlumbroso/free-disk-space@main
+2 -6
View File
@@ -4,11 +4,7 @@ on:
workflow_dispatch:
inputs:
pr_number:
description: 'PR number to build wheel for'
required: true
type: string
pr_branch:
description: 'PR branch name to build from (e.g., my-feature-branch or refs/pull/123/head)'
description: 'PR number to build wheel for (works with both internal and fork PRs)'
required: true
type: string
@@ -27,7 +23,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.pr_branch }}
ref: refs/pull/${{ inputs.pr_number }}/head
fetch-depth: 0 # Need full history for version generation
- name: Set up Python