Update dependencies #147
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 6 * * 1' # once every monday | |
jobs: | |
update-deps: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Read .nvmrc | |
run: echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_OUTPUT | |
id: nvm | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
- name: Use Node.js ${{ steps.nvm.outputs.NVMRC }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ steps.nvm.outputs.NVMRC }} | |
cache: 'pnpm' | |
- name: Check for updates | |
uses: mathiasvr/command-output@v1 | |
id: ncu | |
with: | |
run: npx -y npm-check-updates -u -t latest --deep --filterVersion "/^[^=]/" --dep prod,dev,optional | |
- name: Install new versions | |
run: | | |
pnpm install --no-frozen-lockfile | |
git add . | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v4 | |
with: | |
token: ${{ secrets.GIT_TOKEN }} | |
commit-message: 'Update dependencies' | |
committer: 'Xata Bot 🦋 <[email protected]>' | |
title: 'Update dependencies' | |
body: | | |
This is an autogenerated PR to update the dependencies! | |
------------------------------------------------------------ | |
``` | |
${{ steps.ncu.outputs.stdout }} | |
``` | |
branch: update-dependencies-${{ github.run_id }} |