Skip to content

Commit e50255f

Browse files
committed
ci: add job to update lockfile
1 parent 772c8cd commit e50255f

2 files changed

Lines changed: 44 additions & 1 deletion

File tree

.github/renovate.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
33
"extends": ["config:recommended"],
44
"schedule": ["before 9am on monday"],
5-
"lockFileMaintenance": { "enabled": true },
65
"commitMessagePrefix": "fix(deps): ",
76
"packageRules": [
87
{
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Update Lockfile
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- '**/package.json'
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
update-lockfile:
14+
name: Update Lockfile
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v6
19+
20+
- name: Setup Bun
21+
uses: oven-sh/setup-bun@v2
22+
with:
23+
bun-version: latest
24+
25+
- name: Install Dependencies
26+
run: bun install
27+
28+
- name: Check for changes
29+
id: changes
30+
run: |
31+
if git diff --quiet; then
32+
echo "has_changes=false" >> "$GITHUB_OUTPUT"
33+
else
34+
echo "has_changes=true" >> "$GITHUB_OUTPUT"
35+
fi
36+
37+
- name: Commit and push
38+
if: steps.changes.outputs.has_changes == 'true'
39+
run: |
40+
git config user.name "github-actions[bot]"
41+
git config user.email "github-actions[bot]@users.noreply.github.com"
42+
git add bun.lock
43+
git commit -m "chore: update lockfile"
44+
git push

0 commit comments

Comments
 (0)