Skip to content

Commit b07f4c4

Browse files
committed
Disable WoA runners on forks
1 parent 18649ae commit b07f4c4

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -163,17 +163,15 @@ jobs:
163163
free-threading:
164164
- false
165165
- true
166-
is-fork: # only used for the exclusion trick
167-
- ${{ github.repository_owner != 'python' }}
168166
include:
169-
- os: windows-aarch64
167+
# Forks don't have access to Windows on Arm runners. These jobs are skipped below:
168+
- os: ${{ github.repository_owner == 'python' && 'windows-aarch64' || 'windows-latest' }}
170169
arch: arm64
171170
free-threading: false
172-
is-fork: false
173-
- os: windows-aarch64
171+
# Forks don't have access to Windows on Arm runners. These jobs are skipped below:
172+
- os: ${{ github.repository_owner == 'python' && 'windows-aarch64' || 'windows-latest' }}
174173
arch: arm64
175174
free-threading: true
176-
is-fork: false
177175
- os: windows-latest
178176
arch: Win32
179177
free-threading: false
@@ -196,12 +194,10 @@ jobs:
196194
arch:
197195
- x86
198196
- x64
199-
is-fork: # only used for the exclusion trick
200-
- ${{ github.repository_owner != 'python' }}
201197
include:
202-
- os: windows-aarch64
198+
# Forks don't have access to Windows on Arm runners. These jobs are skipped below:
199+
- os: ${{ github.repository_owner == 'python' && 'windows-aarch64' || 'windows-latest' }}
203200
arch: arm64
204-
is-fork: false
205201
uses: ./.github/workflows/reusable-windows-msi.yml
206202
with:
207203
os: ${{ matrix.os }}

.github/workflows/reusable-windows-msi.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ env:
2020

2121
jobs:
2222
build:
23+
if: inputs.arch != 'ARM64' || github.repository_owner == 'python'
2324
name: installer for ${{ inputs.arch }}
2425
runs-on: ${{ inputs.os }}
2526
timeout-minutes: 60

.github/workflows/reusable-windows.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ env:
2424
2525
jobs:
2626
build:
27+
# Forks don't have access to Windows on Arm runners. Skip those:
28+
if: inputs.arch != 'ARM64' || github.repository_owner == 'python'
2729
name: Build and test (${{ inputs.arch }})
2830
runs-on: ${{ inputs.os }}
2931
timeout-minutes: 60

0 commit comments

Comments
 (0)