Try to fix action

This commit is contained in:
Dan Abramov
2024-12-19 05:19:57 +00:00
parent 513a188a21
commit 24540400d9
+7 -2
View File
@@ -11,19 +11,24 @@ jobs:
name: Verify yarn.lock changes name: Verify yarn.lock changes
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Check out Git repository - name: Check out PR HEAD
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Fetch base branch
run: git fetch origin ${{ github.base_ref }} --depth=1
- name: Install node - name: Install node
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version-file: .nvmrc node-version-file: .nvmrc
- name: Verify yarn.lock - name: Verify yarn.lock
uses: Wandalen/wretry.action@master uses: Wandalen/wretry.action@master
with: with:
command: | command: |
git show "${{ github.base_ref }}:yarn.lock" > yarn.lock git show "origin/${{ github.base_ref }}:yarn.lock" > yarn.lock
yarn yarn
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`.'