Tweak GH action

This commit is contained in:
Dan Abramov
2024-12-19 05:36:19 +00:00
parent 24540400d9
commit 59739a6088
+5 -7
View File
@@ -1,4 +1,4 @@
name: Verify yarn.lock name: Lockfile
on: on:
pull_request: pull_request:
@@ -8,7 +8,7 @@ concurrency:
jobs: jobs:
verify-yarn-lock: verify-yarn-lock:
name: Verify yarn.lock changes name: No manual yarn.lock edits
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Check out PR HEAD - name: Check out PR HEAD
@@ -32,11 +32,9 @@ jobs:
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`.'
echo '::error::1. If this is intentional, you can ignore this check.' echo '::error:: - If this is intentional, you can ignore this check.'
echo '::error::2. If this is not intentional, apply the following diff:' echo '::error:: - If this is unintentional, apply the following diff:'
echo '```diff' git --no-pager diff
git --no-pager diff -R
echo '```'
exit 1 exit 1
} }
attempt_limit: 3 attempt_limit: 3