Update dependencies #32
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: Update dependencies | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * 0" | |
permissions: {} | |
jobs: | |
update_deps: | |
permissions: | |
contents: write # to create branch (peter-evans/create-pull-request) | |
pull-requests: write # to create a PR (peter-evans/create-pull-request) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- run: npm install | |
- run: npm ls --depth 0 --prod --parseable | tail -n +2 | xargs -I '{}' basename "{}" | xargs -I '{}' npm install '{}'@latest | |
- run: rm -rf node_modules package-lock.json && npm install | |
- uses: peter-evans/create-pull-request@v4 | |
with: | |
commit-message: Update dependencies | |
branch: "update_deps" | |
title: Update dependencies |