40 lines
961 B
YAML
40 lines
961 B
YAML
name: Update pnpm Dependencies
|
|
|
|
on:
|
|
schedule:
|
|
- cron: "0 0 * * 1"
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
update-dependencies:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: "20.10.0"
|
|
cache: "pnpm"
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@v2
|
|
with:
|
|
version: 9.7.0
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
|
|
- name: Update dependencies
|
|
run: pnpm update
|
|
|
|
- name: Commit and push changes
|
|
run: |
|
|
git config --global user.name 'github-actions[bot]'
|
|
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
|
|
git diff --quiet || (git add . && git commit -m '[update]: update dependencies' && git push)
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|