-
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (41 loc) · 1.25 KB
/
upgrade.yml
File metadata and controls
44 lines (41 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Update dependencies
on:
schedule:
- cron: "0 */8 * * *"
workflow_dispatch:
jobs:
update-deps:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: true
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- name: Setup Git
run: |
git config --global user.name "mayank1513"
git config --global user.email "mayank.srmu@gmail.com"
git fetch
git checkout main
git pull
- run: git stash --include-untracked
name: clean up working directory
- run: pnpm upgrade
name: Update dependencies
- run: pnpm build --filter @example/nextjs
name: Build all apps to make sure it is not broken due to dependency upgrades
- name: Run unit tests
run: cd lib && pnpm test
- name: Save upgraded packages back to repo
run: |
echo $(date +%F_%H:%M:%S) > .lst && git add . && git commit -m "upgrade deps && docs [skip ci]" && git push origin main