From 3ce6a05aac1b2ec7a2e7cc98286e04b7fc2776a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oskar=20Kwa=C5=9Bniewski?= Date: Wed, 10 Sep 2025 03:57:54 -0700 Subject: [PATCH] fix: add conditional checks for facebook/react-native repo for nightly (#53700) Summary: This PR adds additional checks to run nightly jobs only on the main repo. I noticed pretty heavy usage on my fork of React Native: Screenshot 2025-09-10 at 11 47 29 I also noticed a typo in this file with output instead of outputs ## Changelog: [INTERNAL] [FIXED] - add conditional checks for facebook/react-native repo for nightly workflow Pull Request resolved: https://github.com/facebook/react-native/pull/53700 Test Plan: Check if the syntax is correct. Reviewed By: cortinico Differential Revision: D82104958 Pulled By: cipolleschi fbshipit-source-id: fc2e6e0299345ebd115c7a574a5a8161f2b0ca5c --- .github/workflows/nightly.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 24177338f95..3abef2c1272 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -23,6 +23,7 @@ jobs: prepare_hermes_workspace: runs-on: ubuntu-latest + if: github.repository == 'facebook/react-native' env: HERMES_WS_DIR: /tmp/hermes HERMES_VERSION_FILE: packages/react-native/sdks/.hermesversion @@ -50,8 +51,8 @@ jobs: - name: Build HermesC Apple uses: ./.github/actions/build-hermesc-apple with: - hermes-version: ${{ needs.prepare_hermes_workspace.output.hermes-version }} - react-native-version: ${{ needs.prepare_hermes_workspace.output.react-native-version }} + hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }} + react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }} build_apple_slices_hermes: runs-on: macos-14 @@ -75,7 +76,7 @@ jobs: uses: ./.github/actions/build-apple-slices-hermes with: flavor: ${{ matrix.flavor }} - slice: ${{ matrix.slice}} + slice: ${{ matrix.slice }} hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }} react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }} @@ -101,6 +102,7 @@ jobs: flavor: ${{ matrix.flavor }} prebuild_apple_dependencies: + if: github.repository == 'facebook/react-native' uses: ./.github/workflows/prebuild-ios-dependencies.yml secrets: inherit @@ -145,6 +147,7 @@ jobs: build_android: runs-on: 8-core-ubuntu + if: github.repository == 'facebook/react-native' needs: [set_release_type] container: image: reactnativecommunity/react-native-android:latest