Bumps [actions/setup-node](https://github.com/actions/setup-node) from 5.0.0 to 6.0.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](a0853c2454...2028fbc5c2)
---
updated-dependencies:
- dependency-name: actions/setup-node
dependency-version: 6.0.0
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
54 lines
1.8 KiB
YAML
54 lines
1.8 KiB
YAML
name: Package lock lint
|
|
|
|
# **What it does**: Makes sure package.json and package-lock.json is in sync
|
|
# **Why we have it**: Accidental manual edits of the dependencies directly in package.json
|
|
# **Who does it impact**: Docs engineering/writers/contributors.
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- package.json
|
|
- package-lock.json
|
|
- .github/workflows/package-lock-lint.yml
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
# This allows a subsequently queued workflow run to interrupt previous runs
|
|
concurrency:
|
|
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
if: github.repository == 'github/docs-internal' || github.repository == 'github/docs'
|
|
steps:
|
|
- name: Check out repo
|
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
|
|
with:
|
|
node-version-file: 'package.json'
|
|
cache: npm
|
|
|
|
- name: Run check
|
|
run: |
|
|
npm --version
|
|
|
|
# From https://docs.npmjs.com/cli/v7/commands/npm-install
|
|
#
|
|
# The --package-lock-only argument will only update the
|
|
# package-lock.json, instead of checking node_modules and
|
|
# downloading dependencies.
|
|
#
|
|
npm install --package-lock-only --ignore-scripts --include=optional
|
|
|
|
# If the package.json (dependencies and devDependencies) is
|
|
# in correct sync with package-lock.json running the above command
|
|
# should *not* make an edit to the package-lock.json. I.e.
|
|
# running `git status` should
|
|
# say "nothing to commit, working tree clean".
|
|
git diff --exit-code
|