Skip to content

Commit 35e9982

Browse files
authored
[Infrastructure] Add a workflow to validate package-lock.json when changes are introduced. (#54688)
When package-lock.json is updated, we will run npm ci --prefer-online to force checking the contents of the package-lock.json against the AzDo feeds.
1 parent cf46191 commit 35e9982

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Validate package-lock.json against source feeds
2+
3+
on:
4+
# Manual run
5+
workflow_dispatch:
6+
pull_request:
7+
paths:
8+
- 'package-lock.json'
9+
10+
jobs:
11+
validate-package-lock-json:
12+
name: 'Validate package-lock.json against source feeds'
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
submodules: false
21+
22+
- name: Set up Node.js
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: 20.x
26+
27+
- name: Run npm ci to validate package-lock.json against the feed
28+
shell: pwsh
29+
id: npm-install-script
30+
run: npm ci --prefer-online --fetch-retries 5

0 commit comments

Comments
 (0)