Dedupe npm packages #115
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Dedupe npm packages | |
on: | |
schedule: | |
- cron: '30 3 * * 0' | |
workflow_dispatch: # for manual testing | |
jobs: | |
dedupe: | |
runs-on: ubuntu-latest | |
steps: | |
# setup | |
- uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'npm' | |
- uses: tibdex/github-app-token@v2 # cspell:words tibdex | |
id: generate-token | |
with: | |
app_id: ${{ secrets.CREATE_PR_APP_ID }} | |
private_key: ${{ secrets.CREATE_PR_APP_PRIVATE_KEY }} | |
# make changes | |
- name: Dedupe and update npm packages | |
run: | | |
npm dedupe | |
npm update | |
# create PR | |
- name: Create PR | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
token: ${{ steps.generate-token.outputs.token }} | |
title: 'chore: dedupe and update npm dependencies' | |
branch: 'create-pull-request/chore-npm-dedupe' |