2022-09-19 00:58:24 +00:00
name : Synchronize Dependencies with syncpack
2022-08-24 15:15:22 +00:00
on :
2023-01-27 07:26:54 +00:00
# Run whenever a pull request is updated
pull_request :
branches :
- trunk
paths :
- '**/package.json'
2023-01-02 17:28:11 +00:00
permissions : {}
2022-08-24 15:15:22 +00:00
jobs :
2023-01-27 07:26:54 +00:00
syncpack :
runs-on : ubuntu-latest
permissions :
contents : read
name : syncpack
steps :
- name : 'Checkout'
uses : actions/checkout@v3
2022-08-24 15:15:22 +00:00
2023-01-27 07:26:54 +00:00
- name : 'Setup node'
uses : actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
with :
node-version : 16
- name : 'Install Syncpack'
2023-03-08 21:13:25 +00:00
run : npm install -g syncpack@^9.8.4
2023-01-27 07:26:54 +00:00
- name : 'List Mismatches'
run : syncpack list-mismatches
- name : 'Explain Remedy'
if : failure()
run : |
2023-11-28 22:50:43 +00:00
echo "Dependency version mismatch detected. This can usually be fixed automatically by updating the pinned version in \`.syncpackrc\` and then running: \`pnpm sync-dependencies\`"
2023-01-27 07:26:54 +00:00
exit 1