Skip to content

Commit cbb221a

Browse files
ericyangpanclaude
andcommitted
ci(improve): enhance dependabot configuration and auto-merge workflow
- Refactor dependabot groups to separate toolchain deps from regular dev deps - Add next-intl to Next.js dependency group - Add lockfile auto-fix to dependabot-auto-merge workflow - Update Node.js version to 22 in update-github-stars workflow 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent ef481b9 commit cbb221a

File tree

3 files changed

+60
-8
lines changed

3 files changed

+60
-8
lines changed

.github/dependabot.yml

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,43 @@ updates:
2020
- "dependencies"
2121
- "automated"
2222
groups:
23-
# Group minor and patch updates together
24-
minor-and-patch:
25-
patterns:
26-
- "*"
27-
update-types:
28-
- "minor"
29-
- "patch"
3023
# Separate group for Next.js updates
3124
nextjs:
3225
patterns:
3326
- "next"
27+
- "next-intl"
3428
- "react"
3529
- "react-dom"
3630
update-types:
3731
- "minor"
3832
- "patch"
33+
# Separate group for toolchain dependencies (riskier upgrades)
34+
toolchain:
35+
dependency-type: "development"
36+
patterns:
37+
- "@biomejs/*"
38+
- "@swc/*"
39+
- "esbuild"
40+
- "vite"
41+
- "rollup"
42+
- "@rollup/*"
43+
- "typescript"
44+
update-types:
45+
- "minor"
46+
- "patch"
3947
# Separate group for dev dependencies
4048
dev-dependencies:
4149
dependency-type: "development"
50+
patterns:
51+
- "*"
52+
update-types:
53+
- "minor"
54+
- "patch"
55+
# Group minor and patch updates together (prod deps only)
56+
minor-and-patch:
57+
dependency-type: "production"
58+
patterns:
59+
- "*"
4260
update-types:
4361
- "minor"
4462
- "patch"

.github/workflows/dependabot-auto-merge.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: Dependabot Auto-merge
33
on:
44
pull_request:
55
branches: [main]
6+
types: [opened, synchronize, reopened, ready_for_review]
67

78
permissions:
89
contents: write
@@ -20,6 +21,39 @@ jobs:
2021
with:
2122
github-token: ${{ secrets.GITHUB_TOKEN }}
2223

24+
- name: Checkout code
25+
uses: actions/checkout@v6
26+
with:
27+
ref: ${{ github.event.pull_request.head.ref }}
28+
token: ${{ secrets.GITHUB_TOKEN }}
29+
30+
- name: Setup Node.js
31+
uses: actions/setup-node@v6
32+
with:
33+
node-version: '22'
34+
cache: 'npm'
35+
36+
- name: Fix lockfile (npm install)
37+
run: npm install --ignore-scripts --no-audit --no-fund
38+
39+
- name: Detect lockfile changes
40+
id: lockfile
41+
run: |
42+
if [[ -n "$(git status --porcelain package-lock.json)" ]]; then
43+
echo "changed=true" >> "$GITHUB_OUTPUT"
44+
else
45+
echo "changed=false" >> "$GITHUB_OUTPUT"
46+
fi
47+
48+
- name: Commit updated package-lock.json
49+
if: steps.lockfile.outputs.changed == 'true'
50+
run: |
51+
git config user.name "github-actions[bot]"
52+
git config user.email "github-actions[bot]@users.noreply.github.com"
53+
git add package-lock.json
54+
git commit -m "chore(deps): update package-lock.json"
55+
git push
56+
2357
- name: Enable auto-merge for minor and patch updates
2458
if: |
2559
(steps.metadata.outputs.update-type == 'version-update:semver-minor' ||

.github/workflows/update-github-stars.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Setup Node.js
2525
uses: actions/setup-node@v6
2626
with:
27-
node-version: '20'
27+
node-version: '22'
2828
cache: 'npm'
2929

3030
- name: Install dependencies

0 commit comments

Comments
 (0)