Skip to content

Commit 331965b

Browse files
committed
improve pakcage lock check
1 parent 668e0ad commit 331965b

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

.github/workflows/check-package-lock.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
name: Check Package Lock File
22

3+
permissions:
4+
contents: read
5+
36
concurrency:
47
group: check-package-lock-${{ github.ref }}
58
cancel-in-progress: true
69

710
on:
811
push:
912
branches:
10-
- "**" # Run on push to any branch
13+
- main # Run on push to main branch only
1114
pull_request:
1215
branches:
1316
- "**" # Run on PR to any branch
@@ -40,3 +43,11 @@ jobs:
4043
exit 1
4144
fi
4245
echo "SUCCESS: package-lock.json file is valid and not empty"
46+
47+
- name: Setup Node.js
48+
uses: actions/setup-node@v4
49+
with:
50+
node-version: '22'
51+
52+
- name: Validate package-lock.json is valid and in sync
53+
run: npm ci --dry-run --ignore-scripts

0 commit comments

Comments
 (0)