From b345cecaaa050d6ee3bf959a8850eb7476178db7 Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Tue, 4 Feb 2025 21:12:19 -0800 Subject: [PATCH] Centralize yarn install to use actions/yarn-install (#49174) Summary: This centralizes the invocation of yarn install to be via the `actions/yarn-install`. It will make it easier to add a retry if we want for all the `yarn install` steps in all the workflows. ## Changelog: [INTERNAL] - Pull Request resolved: https://github.com/facebook/react-native/pull/49174 Test Plan: CI Reviewed By: NickGerleman Differential Revision: D69121525 Pulled By: cortinico fbshipit-source-id: 135da2e172cdf95b2a0ef8fd3d25996ab9317167 --- .github/actions/lint/action.yml | 5 ++--- .github/actions/maestro-ios/action.yml | 4 ++-- .github/workflows/danger-pr.yml | 5 ++--- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/actions/lint/action.yml b/.github/actions/lint/action.yml index f7a5d2d0f96..415a50b7795 100644 --- a/.github/actions/lint/action.yml +++ b/.github/actions/lint/action.yml @@ -15,9 +15,8 @@ runs: uses: ./.github/actions/setup-node with: node-version: ${{ inputs.node-version }} - - name: Yarn install - shell: bash - run: yarn install --non-interactive --frozen-lockfile + - name: Run yarn install + uses: ./.github/actions/yarn-install - name: Run linters against modified files (analysis-bot) shell: bash run: yarn lint-ci diff --git a/.github/actions/maestro-ios/action.yml b/.github/actions/maestro-ios/action.yml index f6929043678..34f8e4d70d7 100644 --- a/.github/actions/maestro-ios/action.yml +++ b/.github/actions/maestro-ios/action.yml @@ -42,12 +42,12 @@ runs: with: java-version: '17' distribution: 'zulu' + - name: Run yarn install + uses: ./.github/actions/yarn-install - name: Start Metro in Debug shell: bash if: ${{ inputs.flavor == 'Debug' }} run: | - yarn install - # build codegen or we will see a redbox ./packages/react-native-codegen/scripts/oss/build.sh diff --git a/.github/workflows/danger-pr.yml b/.github/workflows/danger-pr.yml index 6d0bd162270..2db802350d9 100644 --- a/.github/workflows/danger-pr.yml +++ b/.github/workflows/danger-pr.yml @@ -18,9 +18,8 @@ jobs: if: github.repository == 'facebook/react-native' steps: - uses: actions/checkout@v4 - - name: Run Yarn Install on Root - run: yarn install - working-directory: . + - name: Run yarn install + uses: ./.github/actions/yarn-install - name: Danger run: yarn danger ci --use-github-checks --failOnErrors working-directory: packages/react-native-bots