Tweak GH action

This commit is contained in:
Dan Abramov
2024-12-19 05:50:37 +00:00
parent 59739a6088
commit a3031de19b
+11 -6
View File
@@ -24,12 +24,19 @@ jobs:
with: with:
node-version-file: .nvmrc node-version-file: .nvmrc
- name: Verify yarn.lock - name: Reset yarn.lock to base
run: git show "origin/${{ github.base_ref }}:yarn.lock" > yarn.lock
- name: Yarn install
uses: Wandalen/wretry.action@master uses: Wandalen/wretry.action@master
with: with:
command: | # Fine to skip scripts since we don't run any code
git show "origin/${{ github.base_ref }}:yarn.lock" > yarn.lock command: yarn install --ignore-scripts
yarn attempt_limit: 3
attempt_delay: 2000
- name: Verify yarn.lock
run: |
git diff --quiet --exit-code || { git diff --quiet --exit-code || {
echo '::error::`yarn.lock` does not match what Yarn would generate given the base `yarn.lock` and the head `package.json`.' echo '::error::`yarn.lock` does not match what Yarn would generate given the base `yarn.lock` and the head `package.json`.'
echo '::error:: - If this is intentional, you can ignore this check.' echo '::error:: - If this is intentional, you can ignore this check.'
@@ -37,5 +44,3 @@ jobs:
git --no-pager diff git --no-pager diff
exit 1 exit 1
} }
attempt_limit: 3
attempt_delay: 2000