Skip to content

Commit 6c49572

Browse files
cipolleschifacebook-github-bot
authored andcommitted
Make sure we don't run RN CI on forks (#53707)
Summary: We had reports from the Community of the RN CI running on forks and causing high costs and bills for them This change should make sure that the most impactful jobs only runs on the React Native CI and not on forks. ## Changelog: [Internal] - Pull Request resolved: #53707 Test Plan: GHA Reviewed By: cortinico Differential Revision: D82107313 Pulled By: cipolleschi fbshipit-source-id: ff7f418344975e7bb8306a6356d774c26bea3db1
1 parent 529f55c commit 6c49572

6 files changed

Lines changed: 11 additions & 0 deletions

File tree

.github/workflows/create-release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ on:
1919

2020
jobs:
2121
create_release:
22+
if: github.repository == 'facebook/react-native'
2223
runs-on: ubuntu-latest
2324
steps:
2425
- name: Checkout

.github/workflows/publish-bumped-packages.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
jobs:
1010
publish_bumped_packages:
1111
runs-on: ubuntu-latest
12+
if: github.repository == 'facebook/react-native'
1213
env:
1314
GHA_NPM_TOKEN: ${{ secrets.GHA_NPM_TOKEN }}
1415
steps:

.github/workflows/publish-release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
2222
prepare_hermes_workspace:
2323
runs-on: ubuntu-latest
24+
if: github.repository == 'facebook/react-native'
2425
env:
2526
HERMES_WS_DIR: /tmp/hermes
2627
HERMES_VERSION_FILE: packages/react-native/sdks/.hermesversion
@@ -98,6 +99,7 @@ jobs:
9899
flavor: ${{ matrix.flavor }}
99100

100101
prebuild_apple_dependencies:
102+
if: github.repository == 'facebook/react-native'
101103
uses: ./.github/workflows/prebuild-ios-dependencies.yml
102104
secrets: inherit
103105

.github/workflows/retry-workflow.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
jobs:
1010
rerun:
1111
runs-on: ubuntu-latest
12+
if: github.repository == 'facebook/react-native'
1213
steps:
1314
- name: rerun ${{ inputs.run_id }}
1415
env:

.github/workflows/test-all.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ on:
1111
jobs:
1212
set_release_type:
1313
runs-on: ubuntu-latest
14+
if: github.repository == 'facebook/react-native'
1415
outputs:
1516
RELEASE_TYPE: ${{ steps.set_release_type.outputs.RELEASE_TYPE }}
1617
env:
@@ -34,6 +35,7 @@ jobs:
3435
3536
prepare_hermes_workspace:
3637
runs-on: ubuntu-latest
38+
if: github.repository == 'facebook/react-native'
3739
env:
3840
HERMES_WS_DIR: /tmp/hermes
3941
HERMES_VERSION_FILE: packages/react-native/sdks/.hermesversion
@@ -112,6 +114,7 @@ jobs:
112114
flavor: ${{ matrix.flavor }}
113115

114116
prebuild_apple_dependencies:
117+
if: github.repository == 'facebook/react-native'
115118
uses: ./.github/workflows/prebuild-ios-dependencies.yml
116119
secrets: inherit
117120

@@ -594,6 +597,7 @@ jobs:
594597

595598
test_js:
596599
runs-on: ubuntu-latest
600+
if: github.repository == 'facebook/react-native'
597601
strategy:
598602
fail-fast: false
599603
matrix:
@@ -608,6 +612,7 @@ jobs:
608612

609613
lint:
610614
runs-on: ubuntu-latest
615+
if: github.repository == 'facebook/react-native'
611616
env:
612617
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
613618
steps:

.github/workflows/validate-dotslash-artifacts.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ on:
2727
jobs:
2828
validate-dotslash-artifacts:
2929
runs-on: ubuntu-latest
30+
if: github.repository == 'facebook/react-native'
3031
steps:
3132
- name: Checkout repository
3233
uses: actions/checkout@v4

0 commit comments

Comments
 (0)