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

chore: integrate npm-lockfile-changes action #846

Merged
merged 10 commits into from
Sep 19, 2024
21 changes: 18 additions & 3 deletions .github/workflows/lockfile.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
name: Check Lockfile
on: pull_request
on:
pull_request:
paths:
- 'package-lock.json'
Comment on lines +2 to +5
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

highlighting this since it's kind of out of scope for the PR and could be reverted if not desired. Figured it would be worth doing to save a few CPU cycles though 😄

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with including this.


jobs:
lockfile:
name: Lockfile check
lockfile_version:
name: Lockfile version check
runs-on: ubuntu-latest
steps:
- name: Check out a copy of the repo
Expand All @@ -11,3 +15,14 @@ jobs:
uses: mansona/npm-lockfile-version@v1
with:
version: 3
lockfile_changes:
name: Lockfile changes check
runs-on: ubuntu-latest
steps:
- name: Check out a copy of the repo
uses: actions/checkout@v4
- name: NPM Lockfile Changes
# The original doesn't support v3 lockfiles so we use a fork that adds support for them
uses: rvanvelzen/npm-lockfile-changes@main
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the sake of security, maybe pin to a specific commit?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed via 6a77584

with:
token: ${{ secrets.GITHUB_TOKEN }}
Loading