Skip to content

Commit 023213d

Browse files
DennisOSRMCopilot
andauthored
chore: add weekly dependency update workflow (#420)
- Runs every Sunday at 00:00 UTC - Updates npm dependencies with npm update - Builds and tests to verify no breakage - Auto-commits changes if dependencies updated Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent e70b9d4 commit 023213d

1 file changed

Lines changed: 48 additions & 0 deletions

File tree

.github/workflows/dependabot.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Dependabot Updates
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * 0' # Weekly on Sunday at 00:00 UTC
6+
7+
permissions:
8+
contents: write
9+
pull-requests: write
10+
11+
jobs:
12+
dependabot:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: '22.x'
23+
cache: 'npm'
24+
25+
- name: Install dependencies
26+
run: npm ci
27+
28+
- name: Update dependencies
29+
run: npm update
30+
31+
- name: Rebuild after update
32+
run: npm run build
33+
34+
- name: Run tests
35+
run: npm test
36+
37+
- name: Commit and push changes
38+
run: |
39+
git config user.name "github-actions[bot]"
40+
git config user.email "github-actions[bot]@users.noreply.github.com"
41+
42+
if ! git diff --quiet; then
43+
git add -A
44+
git commit -m "chore: update dependencies"
45+
git push
46+
else
47+
echo "No changes to commit"
48+
fi

0 commit comments

Comments
 (0)