Compare commits

...
Author SHA1 Message Date
Nicola Corti 4747d8c633 Update action.yml 2025-02-05 13:54:51 +00:00
Nicola Corti d5fe3fc0f0 Add retry to yarn-install step 2025-02-05 13:43:29 +00:00
+14 -1
View File
@@ -4,4 +4,17 @@ runs:
steps:
- name: Install dependencies
shell: bash
run: yarn install --non-interactive --frozen-lockfile
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