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: add workflow for lockfile checks #892

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/lockfile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Check Lockfile
on:
pull_request:

jobs:
lockfile_version:
name: Lockfile version check
runs-on: ubuntu-latest
steps:
- name: Check out a copy of the repo
uses: actions/checkout@v4
- name: Check package-lock.json version has not been changed
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: Create GitHub App Token
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.LOCKFILE_BOT_APP_ID }}
private-key: ${{ secrets.LOCKFILE_BOT_PRIVATE_KEY }}
- name: NPM Lockfile Changes
# The original doesn't support v3 lockfiles so we use a fork that adds support for them
# The fork doesn't update comments by an app token, so we use our own fork
uses: digidem/npm-lockfile-changes@614dfc33742374cb40bec2878e5b690580d11ede
with:
token: ${{ steps.app-token.outputs.token }}
updateComment: true
Loading