diff --git a/.github/workflows/lockfile.yml b/.github/workflows/lockfile.yml index 046e77b70..1c9cdaf2e 100644 --- a/.github/workflows/lockfile.yml +++ b/.github/workflows/lockfile.yml @@ -1,8 +1,12 @@ name: Check Lockfile -on: pull_request +on: + pull_request: + paths: + - 'package-lock.json' + jobs: - lockfile: - name: Lockfile check + lockfile_version: + name: Lockfile version check runs-on: ubuntu-latest steps: - name: Check out a copy of the repo @@ -11,3 +15,20 @@ 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: 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 + uses: rvanvelzen/npm-lockfile-changes@6fded38b5a054f5ab49efd6850668e796f780604 + with: + token: ${{ steps.app-token.outputs.token }} diff --git a/package-lock.json b/package-lock.json index 6c4516853..26cdb9c43 100644 --- a/package-lock.json +++ b/package-lock.json @@ -40,7 +40,7 @@ "map-obj": "^5.0.2", "mime": "^4.0.3", "multi-core-indexer": "^1.0.0-alpha.10", - "p-defer": "^4.0.0", + "p-defer": "^4.0.1", "p-event": "^6.0.1", "p-timeout": "^6.1.2", "protobufjs": "^7.2.3", @@ -5700,8 +5700,9 @@ } }, "node_modules/p-defer": { - "version": "4.0.0", - "license": "MIT", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-4.0.1.tgz", + "integrity": "sha512-Mr5KC5efvAK5VUptYEIopP1bakB85k2IWXaRC0rsh1uwn1L6M0LVml8OIQ4Gudg4oyZakf7FmeRLkMMtZW1i5A==", "engines": { "node": ">=12" }, diff --git a/package.json b/package.json index 657338a8e..504d57077 100644 --- a/package.json +++ b/package.json @@ -182,7 +182,7 @@ "map-obj": "^5.0.2", "mime": "^4.0.3", "multi-core-indexer": "^1.0.0-alpha.10", - "p-defer": "^4.0.0", + "p-defer": "^4.0.1", "p-event": "^6.0.1", "p-timeout": "^6.1.2", "protobufjs": "^7.2.3",