2023-07-20 12:32:36 +01:00
|
|
|
name: Update dependencies
|
2023-01-05 08:02:08 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
schedule:
|
2023-03-07 13:03:33 +00:00
|
|
|
- cron: '0 8 * * MON'
|
2023-07-20 12:32:36 +01:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
paths:
|
|
|
|
- '**/package.json'
|
|
|
|
- '**/pnpm-lock.yaml'
|
|
|
|
- 'scripts/**'
|
2023-01-05 08:02:08 +00:00
|
|
|
|
|
|
|
jobs:
|
2023-01-09 09:58:27 +00:00
|
|
|
build:
|
2023-01-05 08:02:08 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-06-12 08:59:41 +01:00
|
|
|
- uses: actions/checkout@v3.5.3
|
2023-01-05 08:02:08 +00:00
|
|
|
|
2023-08-21 08:48:03 +01:00
|
|
|
- uses: actions/setup-node@v3.8.1
|
2023-01-05 08:02:08 +00:00
|
|
|
with:
|
2023-01-09 09:58:27 +00:00
|
|
|
node-version: 19.x
|
2023-01-05 08:02:08 +00:00
|
|
|
|
2023-01-09 09:58:27 +00:00
|
|
|
# Run `yarn upgrade`
|
|
|
|
- uses: browniebroke/yarn-upgrade-action@v1.1
|
2023-01-05 08:02:08 +00:00
|
|
|
|
2023-01-14 08:33:03 +00:00
|
|
|
- name: update package.json
|
|
|
|
run: |
|
|
|
|
npx package-json-dependency-updater -u
|
2023-01-14 08:36:08 +00:00
|
|
|
|
2023-01-14 08:33:03 +00:00
|
|
|
- name: Install
|
|
|
|
run: |
|
|
|
|
yarn
|
|
|
|
|
2023-01-14 09:08:35 +00:00
|
|
|
- name: Fix lint
|
|
|
|
run: |
|
|
|
|
yarn run format
|
|
|
|
|
2023-07-20 12:32:36 +01:00
|
|
|
- name: Gen Body
|
|
|
|
run: |
|
|
|
|
echo 'git_body<<DIFF' >> $GITHUB_ENV
|
|
|
|
git --no-pager diff --compact-summary >> $GITHUB_ENV
|
|
|
|
echo 'DIFF' >> $GITHUB_ENV
|
|
|
|
|
2023-01-09 09:58:27 +00:00
|
|
|
# Open a pull request if there are any changes
|
2023-01-05 08:02:08 +00:00
|
|
|
- name: Create Pull Request
|
2023-07-03 08:46:16 +01:00
|
|
|
uses: peter-evans/create-pull-request@v5.0.2
|
2023-01-05 08:02:08 +00:00
|
|
|
with:
|
2023-01-09 09:58:27 +00:00
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
branch: update/yarn-upgrade
|
2023-07-20 12:32:36 +01:00
|
|
|
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
|
|
|
|
|
2023-07-20 12:42:36 +01:00
|
|
|
- name: Auto merge
|
|
|
|
uses: peter-evans/enable-pull-request-automerge@v3
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
pull-request-number: 1
|