Skip to content

Commit c3311b2

Browse files
committed
fix: pnpm with bot
1 parent 925c79f commit c3311b2

File tree

2 files changed

+35
-11
lines changed

2 files changed

+35
-11
lines changed

.github/dependabot.yml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
version: 2
22
updates:
3-
- package-ecosystem: npm
4-
directory: "/"
5-
schedule:
6-
interval: monthly
7-
time: "21:00"
8-
timezone: Asia/Shanghai
9-
open-pull-requests-limit: 10
10-
reviewers:
11-
- gengjiawen
12-
versioning-strategy: increase
13-
3+
- package-ecosystem: npm
4+
directory: '/'
5+
schedule:
6+
interval: monthly
7+
time: '21:00'
8+
timezone: Asia/Shanghai
9+
open-pull-requests-limit: 10
10+
reviewers:
11+
- gengjiawen
12+
versioning-strategy: increase

.github/workflows/update-lockfile.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# https://github.com/dependabot/dependabot-core/issues/1736
2+
name: Dependabot
3+
on: pull_request_target
4+
permissions: read-all
5+
jobs:
6+
update-lockfile:
7+
runs-on: ubuntu-latest
8+
if: ${{ github.actor == 'dependabot[bot]' }}
9+
permissions:
10+
pull-requests: write
11+
contents: write
12+
steps:
13+
- uses: pnpm/action-setup@v2
14+
with:
15+
version: ^7
16+
- uses: actions/checkout@v3
17+
with:
18+
ref: ${{ github.event.pull_request.head.ref }}
19+
- run: pnpm i --lockfile-only
20+
- run: |
21+
git config --global user.name github-actions[bot]
22+
git config --global user.email github-actions[bot]@users.noreply.github.com
23+
git add pnpm-lock.yaml
24+
git commit -m "Update pnpm-lock.yaml"
25+
git push

0 commit comments

Comments
 (0)