mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
a7a51275b5
Summary: I've noticed that test_js (20) and test_js (24) are actually running on Node 22. That's because the `yarn-install` action is invoking setup-node again with the default value (22). This changes it. Also I'm cleaning up the workflows so that every `yarn-install` invocation is happening just after the `setup-node` invocation. ## Changelog: [INTERNAL] - Pull Request resolved: https://github.com/facebook/react-native/pull/52737 Test Plan: CI which will most likely be red for test_js (20) so will need a follow-up Reviewed By: cipolleschi Differential Revision: D78664671 Pulled By: cortinico fbshipit-source-id: c73390930d1511d1bf0f2d4ea92e83f50b10247f
21 lines
615 B
YAML
21 lines
615 B
YAML
name: yarn-install
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- name: Install dependencies
|
|
shell: bash
|
|
run: |
|
|
MAX_ATTEMPTS=2
|
|
ATTEMPT=0
|
|
WAIT_TIME=20
|
|
while [ $ATTEMPT -lt $MAX_ATTEMPTS ]; do
|
|
yarn install --non-interactive --frozen-lockfile && break
|
|
echo "yarn install failed. Retrying in $WAIT_TIME seconds..."
|
|
sleep $WAIT_TIME
|
|
ATTEMPT=$((ATTEMPT + 1))
|
|
done
|
|
if [ $ATTEMPT -eq $MAX_ATTEMPTS ]; then
|
|
echo "All attempts to invoke yarn install failed - Aborting the workflow"
|
|
exit 1
|
|
fi
|