Update dependencies #250
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 8 * * MON' | |
push: | |
branches: | |
- main | |
paths: | |
- '**/package.json' | |
- '**/pnpm-lock.yaml' | |
- 'scripts/**' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4.2.0 | |
- uses: actions/setup-node@v4.0.4 | |
with: | |
node-version: 19.x | |
# Run `yarn upgrade` | |
- uses: browniebroke/yarn-upgrade-action@v1.1 | |
- name: update package.json | |
run: | | |
npx package-json-dependency-updater -u | |
- name: Install | |
run: | | |
yarn | |
- name: Fix lint | |
run: | | |
yarn run format | |
- name: Gen Body | |
run: | | |
echo 'git_body<<DIFF' >> $GITHUB_ENV | |
git --no-pager diff --compact-summary >> $GITHUB_ENV | |
echo 'DIFF' >> $GITHUB_ENV | |
# Open a pull request if there are any changes | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v7.0.5 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
branch: update/yarn-upgrade | |
title: 'chore(deps): Bump yarn dependencies' | |
commit-message: 'chore(deps): Bump yarn dependencies' | |
labels: | | |
dependencies | |
javascript | |
body: | | |
Update yarn dependencies | |
${{ env.git_body }} | |
Auto-generated by [create-pull-request][1] | |
[1]: https://github.com/peter-evans/create-pull-request |