Skip to content

Commit 5fb7919

Browse files
committed
chore: expand dependency updater for release/2
1 parent 987363c commit 5fb7919

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

.github/workflows/auto-dependency-updater.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,21 @@ env:
55
version: v2
66

77
on:
8-
# schedule:
9-
# - cron: '0 2 * * *'
8+
schedule:
9+
- cron: '0 2 * * 0'
1010
workflow_dispatch:
1111

1212
jobs:
1313
update:
1414
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
base: [main, release/2]
1518
steps:
1619
- uses: actions/checkout@v5
1720
with:
1821
fetch-depth: 0
22+
ref: ${{ matrix.base }}
1923
persist-credentials: false
2024

2125
# - uses: pnpm/action-setup@v4
@@ -49,23 +53,19 @@ jobs:
4953
${{ runner.os }}-pnpm-store
5054
5155
- 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 }}
5357
- name: Install
5458
run: pnpm i --no-frozen-lockfile
5559
- name: Update dependencies
5660
run: pnpm ncu:minor
5761
- name: Reinstall dependencies
5862
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
6865
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

Comments
 (0)