|
5 | 5 | version: v2 |
6 | 6 |
|
7 | 7 | on: |
8 | | - # schedule: |
9 | | - # - cron: '0 2 * * *' |
| 8 | + schedule: |
| 9 | + - cron: '0 2 * * 0' |
10 | 10 | workflow_dispatch: |
11 | 11 |
|
12 | 12 | jobs: |
13 | 13 | update: |
14 | 14 | runs-on: ubuntu-latest |
| 15 | + strategy: |
| 16 | + matrix: |
| 17 | + base: [main, release/2] |
15 | 18 | steps: |
16 | 19 | - uses: actions/checkout@v5 |
17 | 20 | with: |
18 | 21 | fetch-depth: 0 |
| 22 | + ref: ${{ matrix.base }} |
19 | 23 | persist-credentials: false |
20 | 24 |
|
21 | 25 | # - uses: pnpm/action-setup@v4 |
@@ -49,23 +53,19 @@ jobs: |
49 | 53 | ${{ runner.os }}-pnpm-store |
50 | 54 |
|
51 | 55 | - name: Create update branch |
52 | | - run: git checkout -b ${{env.issue}}-${{env.version}}/auto-update-deps |
| 56 | + run: git checkout -b ${{env.issue}}-${{env.version}}/auto-update-deps-${{ matrix.base }} |
53 | 57 | - name: Install |
54 | 58 | run: pnpm i --no-frozen-lockfile |
55 | 59 | - name: Update dependencies |
56 | 60 | run: pnpm ncu:minor |
57 | 61 | - name: Reinstall dependencies |
58 | 62 | 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 |
| 63 | + - name: Create Pull Request |
| 64 | + uses: peter-evans/create-pull-request@v6 |
68 | 65 | with: |
69 | | - github_token: ${{ secrets.GITHUB_TOKEN }} |
70 | | - branch: ${{env.issue}}-${{env.version}}/auto-update-deps |
71 | | - force: true |
| 66 | + base: ${{ matrix.base }} |
| 67 | + branch: ${{ env.issue }}-${{ env.version }}/auto-update-deps-${{ matrix.base }} |
| 68 | + commit-message: chore: update dependencies and lock file |
| 69 | + title: 'chore: update dependencies and lock file' |
| 70 | + body: 'Automated dependency updates from issue #${{ env.issue }}.' |
| 71 | + |
0 commit comments