Skip to content

Commit f504a35

Browse files
authored
[Validation] Pass ref:main to general worker (#1197)
* Pass ref:main to general worker * Try to pass reference to workflow * Pass ref:main to general worker * Test * Pass reference as input parameter * Make new variable not required * Fix typo
1 parent 3bb6560 commit f504a35

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

.github/workflows/validate-binaries.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ on:
1717
description: "Channel to use (nightly, test, release, all)"
1818
required: true
1919
type: string
20+
ref:
21+
description: 'Reference to checkout, defaults to empty'
22+
default: ""
23+
required: false
24+
type: string
2025
workflow_dispatch:
2126
inputs:
2227
os:
@@ -39,13 +44,19 @@ on:
3944
- nightly
4045
- test
4146
- all
47+
ref:
48+
description: 'Reference to checkout, defaults to empty'
49+
default: ""
50+
required: false
51+
type: string
4252

4353
jobs:
4454
win:
4555
if: inputs.os == 'windows' || inputs.os == 'all'
4656
uses: ./.github/workflows/validate-windows-binaries.yml
4757
with:
4858
channel: ${{ inputs.channel }}
59+
ref: ${{ inputs.ref || github.ref }}
4960

5061
linux:
5162
if: inputs.os == 'linux' || inputs.os == 'all'

.github/workflows/validate-windows-binaries.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ on:
77
description: "Channel to use (nightly, test, release, all)"
88
required: true
99
type: string
10+
ref:
11+
description: 'Reference to checkout, defaults to empty'
12+
default: ""
13+
required: false
14+
type: string
1015
workflow_dispatch:
1116
inputs:
1217
channel:
@@ -18,6 +23,11 @@ on:
1823
- nightly
1924
- test
2025
- all
26+
ref:
27+
description: 'Reference to checkout, defaults to empty'
28+
default: ""
29+
required: false
30+
type: string
2131

2232
jobs:
2333
generate-windows-matrix:
@@ -37,6 +47,7 @@ jobs:
3747
with:
3848
runner: ${{ matrix.validation_runner }}
3949
repository: "pytorch/builder"
50+
ref: ${{ inputs.ref || github.ref }}
4051
job-name: ${{ matrix.build_name }}
4152
script: |
4253
set -ex

0 commit comments

Comments
 (0)