From 7d886b4461be44cbd7cbc8411f07b05a4a2b9f12 Mon Sep 17 00:00:00 2001 From: Huy Do Date: Tue, 26 Nov 2024 13:39:27 -0800 Subject: [PATCH 1/2] [Reland] Skip building Apple demo app on fork PRs --- .github/workflows/apple.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/apple.yml b/.github/workflows/apple.yml index 3a07c6d3940..f284d466bf0 100644 --- a/.github/workflows/apple.yml +++ b/.github/workflows/apple.yml @@ -42,6 +42,8 @@ jobs: build-demo-ios: name: build-demo-ios + # NB: Don't run this on fork PRs because they won't have access to the secret and would fail anyway + if: ${{ !github.event.pull_request.head.repo.fork }} uses: pytorch/test-infra/.github/workflows/macos_job.yml@main secrets: inherit with: @@ -190,6 +192,8 @@ jobs: ) done upload-frameworks-ios: + # NB: Don't run this on fork PRs because they won't have access to the secret and would fail anyway + if: ${{ !github.event.pull_request.head.repo.fork }} runs-on: ubuntu-22.04 needs: [build-frameworks-ios, set-version] timeout-minutes: 30 @@ -278,6 +282,8 @@ jobs: build-benchmark-app: name: build-benchmark-app + # NB: Don't run this on fork PRs because they won't have access to the secret and would fail anyway + if: ${{ !github.event.pull_request.head.repo.fork }} uses: pytorch/test-infra/.github/workflows/macos_job.yml@main secrets: inherit with: From f0466e0014074f31e48eea117fdad781eb7afdbd Mon Sep 17 00:00:00 2001 From: Huy Do Date: Tue, 26 Nov 2024 13:48:46 -0800 Subject: [PATCH 2/2] Also skip test-huggingface-transformers on forks --- .github/workflows/trunk.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/trunk.yml b/.github/workflows/trunk.yml index ae1b88fb182..dc6beb279f1 100644 --- a/.github/workflows/trunk.yml +++ b/.github/workflows/trunk.yml @@ -351,6 +351,8 @@ jobs: done test-huggingface-transformers: + # NB: Don't run this on fork PRs because they won't have access to the secret and would fail anyway + if: ${{ !github.event.pull_request.head.repo.fork }} name: test-huggingface-transformers uses: pytorch/test-infra/.github/workflows/linux_job.yml@main secrets: inherit