@@ -237,7 +237,7 @@ jobs:
237237
238238 cargo-test-linux :
239239 name : " cargo test (linux)"
240- runs-on : depot-ubuntu-22.04-16
240+ runs-on : ${{ github.repository == 'astral-sh/ruff' && ' depot-ubuntu-22.04-16' || 'ubuntu-latest' }}
241241 needs : determine_changes
242242 if : ${{ !contains(github.event.pull_request.labels.*.name, 'no-test') && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
243243 timeout-minutes : 20
@@ -299,7 +299,7 @@ jobs:
299299
300300 cargo-test-linux-release :
301301 name : " cargo test (linux, release)"
302- runs-on : depot-ubuntu-22.04-16
302+ runs-on : ${{ github.repository == 'astral-sh/ruff' && ' depot-ubuntu-22.04-16' || 'ubuntu-latest' }}
303303 needs : determine_changes
304304 if : ${{ !contains(github.event.pull_request.labels.*.name, 'no-test') && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
305305 timeout-minutes : 20
@@ -332,7 +332,7 @@ jobs:
332332
333333 cargo-test-windows :
334334 name : " cargo test (windows)"
335- runs-on : depot-windows-2022-16
335+ runs-on : ${{ github.repository == 'astral-sh/ruff' && ' depot-windows-2022-16' || 'windows-latest' }}
336336 needs : determine_changes
337337 if : ${{ !contains(github.event.pull_request.labels.*.name, 'no-test') && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
338338 timeout-minutes : 20
@@ -424,7 +424,7 @@ jobs:
424424
425425 cargo-build-msrv :
426426 name : " cargo build (msrv)"
427- runs-on : depot-ubuntu-latest-8
427+ runs-on : ${{ github.repository == 'astral-sh/ruff' && ' depot-ubuntu-latest-8' || 'ubuntu-latest' }}
428428 needs : determine_changes
429429 if : ${{ !contains(github.event.pull_request.labels.*.name, 'no-test') && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
430430 timeout-minutes : 20
@@ -538,7 +538,7 @@ jobs:
538538
539539 ecosystem :
540540 name : " ecosystem"
541- runs-on : depot-ubuntu-latest-8
541+ runs-on : ${{ github.repository == 'astral-sh/ruff' && ' depot-ubuntu-latest-8' || 'ubuntu-latest' }}
542542 needs :
543543 - cargo-test-linux
544544 - determine_changes
@@ -663,7 +663,7 @@ jobs:
663663
664664 fuzz-ty :
665665 name : " Fuzz for new ty panics"
666- runs-on : depot-ubuntu-22.04-16
666+ runs-on : ${{ github.repository == 'astral-sh/ruff' && ' depot-ubuntu-22.04-16' || 'ubuntu-latest' }}
667667 needs :
668668 - cargo-test-linux
669669 - determine_changes
@@ -723,7 +723,7 @@ jobs:
723723
724724 ty-completion-evaluation :
725725 name : " ty completion evaluation"
726- runs-on : depot-ubuntu-22.04-16
726+ runs-on : ${{ github.repository == 'astral-sh/ruff' && ' depot-ubuntu-22.04-16' || 'ubuntu-latest' }}
727727 needs : determine_changes
728728 if : ${{ needs.determine_changes.outputs.ty == 'true' || github.ref == 'refs/heads/main' }}
729729 steps :
@@ -769,7 +769,7 @@ jobs:
769769
770770 pre-commit :
771771 name : " pre-commit"
772- runs-on : depot-ubuntu-22.04-16
772+ runs-on : ${{ github.repository == 'astral-sh/ruff' && ' depot-ubuntu-22.04-16' || 'ubuntu-latest' }}
773773 timeout-minutes : 10
774774 steps :
775775 - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
@@ -943,8 +943,12 @@ jobs:
943943 runs-on : ubuntu-24.04
944944 needs : determine_changes
945945 if : |
946- github.ref == 'refs/heads/main' ||
947- (needs.determine_changes.outputs.formatter == 'true' || needs.determine_changes.outputs.linter == 'true')
946+ github.repository == 'astral-sh/ruff' &&
947+ (
948+ github.ref == 'refs/heads/main' ||
949+ needs.determine_changes.outputs.formatter == 'true' ||
950+ needs.determine_changes.outputs.linter == 'true'
951+ )
948952 timeout-minutes : 20
949953 steps :
950954 - name : " Checkout Branch"
@@ -978,8 +982,11 @@ jobs:
978982 runs-on : ubuntu-24.04
979983 needs : determine_changes
980984 if : |
981- github.ref == 'refs/heads/main' ||
982- needs.determine_changes.outputs.ty == 'true'
985+ github.repository == 'astral-sh/ruff' &&
986+ (
987+ github.ref == 'refs/heads/main' ||
988+ needs.determine_changes.outputs.ty == 'true'
989+ )
983990 timeout-minutes : 20
984991 steps :
985992 - name : " Checkout Branch"
0 commit comments