Repository navigation
43 lines (42 loc) · 1.52 KB
/
Copy pathlockfile.yml
File metadata and controls
43 lines (42 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Check Lockfile
on:
pull_request:
jobs:
lockfile_version:
name: Lockfile version check
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Check out a copy of the repo
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Check package-lock.json version has not been changed
uses: mansona/npm-lockfile-version@85d9138b7776b4f8f768259f8a3e4f2611457d8f # v1
with:
version: 3
lockfile_changes:
name: Lockfile changes check
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Check out a copy of the repo
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Create GitHub App Token
uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0
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