Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Infrastructure] Add a workflow to validate package-lock.json when changes are introduced. #54688

Merged
merged 9 commits into from
Mar 22, 2024
30 changes: 30 additions & 0 deletions .github/workflows/validate-npm-package-lock-json.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Validate package-lock.json against source feeds

on:
# Manual run
workflow_dispatch:
pull_request:
paths:
- 'package-lock.json'

jobs:
validate-package-lock-json:
name: 'Validate package-lock.json against source feeds'
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: false

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x

- name: Run npm ci to validate package-lock.json against the feed
shell: pwsh
id: npm-install-script
run: npm ci --prefer-online --fetch-retries 5