chore: Clean up dependency updater

imgbot
KieranRobson 2023-07-20 12:32:36 +01:00
parent af12c94f95
commit ed08b867ae
1 changed files with 32 additions and 3 deletions

View File

@ -1,9 +1,16 @@
name: Update Dependencies
name: Update dependencies
on:
workflow_dispatch:
schedule:
- cron: '0 8 * * MON'
push:
branches:
- main
paths:
- '**/package.json'
- '**/pnpm-lock.yaml'
- 'scripts/**'
jobs:
build:
@ -30,11 +37,33 @@ jobs:
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@v5.0.2
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: update/yarn-upgrade
title: 'chore(deps): Upgrade dependencies'
commit-message: 'chore(deps): Run 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
- name: Enable Pull Request Automatic Merge
run: gh pr merge --merge --auto "1"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}