[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.
This commit is contained in:
Javier Calvarro Nelson 2024-03-22 17:20:23 +01:00 коммит произвёл GitHub
Родитель cf46191a3a
Коммит 35e99821a2
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
1 изменённых файлов: 30 добавлений и 0 удалений

30
.github/workflows/validate-npm-package-lock-json.yml поставляемый Normal file
Просмотреть файл

@ -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