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: workflow_dispatch:
inputs: inputs:
pr_number: pr_number:
description: 'PR number to build from' description: 'PR number to build from (works with both internal and fork PRs)'
required: true
type: string
pr_branch:
description: 'PR branch name to build from (e.g., my-feature-branch or refs/pull/123/head)'
required: true required: true
type: string type: string
@@ -43,7 +39,7 @@ jobs:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
ref: ${{ inputs.pr_branch }} ref: refs/pull/${{ inputs.pr_number }}/head
- name: Free disk space - name: Free disk space
uses: jlumbroso/free-disk-space@main uses: jlumbroso/free-disk-space@main
+2 -6
View File
@@ -4,11 +4,7 @@ on:
workflow_dispatch: workflow_dispatch:
inputs: inputs:
pr_number: pr_number:
description: 'PR number to build wheel for' description: 'PR number to build wheel for (works with both internal and fork PRs)'
required: true
type: string
pr_branch:
description: 'PR branch name to build from (e.g., my-feature-branch or refs/pull/123/head)'
required: true required: true
type: string type: string
@@ -27,7 +23,7 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
ref: ${{ inputs.pr_branch }} ref: refs/pull/${{ inputs.pr_number }}/head
fetch-depth: 0 # Need full history for version generation fetch-depth: 0 # Need full history for version generation
- name: Set up Python - name: Set up Python