@@ -2,20 +2,29 @@ name: Auto dependency updater
22
33env :
44 issue : 6350
5- version : v2
65
76on :
8- # schedule:
9- # - cron: '0 2 * * * '
7+ schedule :
8+ - cron : ' 0 2 * * 0 '
109 workflow_dispatch :
1110
1211jobs :
1312 update :
1413 runs-on : ubuntu-latest
14+ strategy :
15+ matrix :
16+ include :
17+ - base : develop
18+ version : v3
19+ - base : release/2
20+ version : v2
21+ env :
22+ version : ${{ matrix.version }}
1523 steps :
1624 - uses : actions/checkout@v5
1725 with :
1826 fetch-depth : 0
27+ ref : ${{ matrix.base }}
1928 persist-credentials : false
2029
2130 # - uses: pnpm/action-setup@v4
@@ -49,23 +58,19 @@ jobs:
4958 ${{ runner.os }}-pnpm-store
5059
5160 - name : Create update branch
52- run : git checkout -b ${{env.issue}}-${{env.version}}/auto-update-deps
61+ run : git checkout -b ${{ env.issue }}-${{ env.version }}/auto-update-deps
5362 - name : Install
5463 run : pnpm i --no-frozen-lockfile
5564 - name : Update dependencies
56- run : pnpm ncu:minor
65+ run : pnpm run update
5766 - name : Reinstall dependencies
5867 run : pnpm i --no-frozen-lockfile
59- - name : Commit changed files
60- run : |
61- git config --local user.email "action@github.com"
62- git config --local user.name "GitHub Action"
63- git add **/package.json pnpm-lock.yaml
64- git status
65- HUSKY=0 git commit -m "chore: update dependencies and lock file"
66-
67- - uses : ad-m/github-push-action@master
68+ - name : Create Pull Request
69+ uses : peter-evans/create-pull-request@v6
6870 with :
69- github_token : ${{ secrets.GITHUB_TOKEN }}
70- branch : ${{env.issue}}-${{env.version}}/auto-update-deps
71- force : true
71+ base : ${{ matrix.base }}
72+ branch : ${{ env.issue }}-${{ env.version }}/auto-update-deps
73+ commit-message : chore: update dependencies and lock file
74+ title : ' chore: update dependencies and lock file'
75+ body : ' Automated dependency updates from issue #${{ env.issue }}.'
76+
0 commit comments