forked from elizaOS/eliza
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (35 loc) · 1.45 KB
/
pnpm-lockfile-check.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Pnpm Lockfile Check
on:
pull_request:
branches: [main]
jobs:
check-lockfile:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 23.3.0
- uses: pnpm/action-setup@v3
with:
version: 9.15.0
- name: Check if lockfile is up-to-date
id: lockfile-check
run: |
# Try to install with frozen lockfile
if ! pnpm install --frozen-lockfile; then
echo "::error::Lockfile is out of date. Please run 'pnpm install --no-frozen-lockfile' and commit the updated pnpm-lock.yaml"
echo "failed=true" >> $GITHUB_OUTPUT
exit 1
fi
- name: Comment on PR
if: failure() && steps.lockfile-check.outputs.failed == 'true'
uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '❌ The pnpm-lockfile is out of date. Please run `pnpm install --no-frozen-lockfile` and commit the updated pnpm-lock.yaml file.'
})