Skip to content

Commit cff8891

Browse files
committed
chore(ci): add dependabot and nix flake update workflows
- Add dependabot.yaml for automated dependency updates - Python dependencies (pip) with weekly schedule - GitHub Actions with weekly schedule - Group dev dependencies and AI framework dependencies - Add nix-flake-update.yaml workflow - Scheduled weekly Nix flake input updates - Auto-creates PR with merge enabled
1 parent 7404a57 commit cff8891

File tree

2 files changed

+122
-0
lines changed

2 files changed

+122
-0
lines changed

.github/dependabot.yaml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
2+
version: 2
3+
updates:
4+
# Python dependencies (uv/pip)
5+
- package-ecosystem: pip
6+
directory: /
7+
schedule:
8+
interval: weekly
9+
day: monday
10+
time: "09:00"
11+
timezone: Europe/London
12+
open-pull-requests-limit: 10
13+
commit-message:
14+
prefix: "chore(deps)"
15+
labels:
16+
- dependencies
17+
- python
18+
groups:
19+
dev-dependencies:
20+
patterns:
21+
- "pytest*"
22+
- "ruff"
23+
- "ty"
24+
- "pre-commit"
25+
- "gitleaks"
26+
update-types:
27+
- minor
28+
- patch
29+
ai-frameworks:
30+
patterns:
31+
- "openai*"
32+
- "langchain*"
33+
- "crewai*"
34+
- "mcp*"
35+
update-types:
36+
- minor
37+
- patch
38+
39+
# GitHub Actions
40+
- package-ecosystem: github-actions
41+
directory: /
42+
schedule:
43+
interval: weekly
44+
day: monday
45+
time: "09:00"
46+
timezone: Europe/London
47+
open-pull-requests-limit: 5
48+
commit-message:
49+
prefix: "chore(deps)"
50+
labels:
51+
- dependencies
52+
- github-actions
53+
groups:
54+
actions:
55+
patterns:
56+
- "*"
57+
update-types:
58+
- minor
59+
- patch
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: "Scheduled: Nix flake update"
2+
3+
on:
4+
schedule:
5+
# Run every Monday at 09:00 UTC (same as Dependabot)
6+
- cron: "0 9 * * 1"
7+
workflow_dispatch: # Allow manual trigger
8+
9+
permissions:
10+
contents: write
11+
pull-requests: write
12+
13+
jobs:
14+
update-flake:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
19+
20+
- name: Setup Nix
21+
uses: ./.github/actions/setup-nix
22+
23+
- name: Update flake.lock
24+
run: nix flake update
25+
26+
- name: Check if flake.lock changed
27+
id: check-changes
28+
run: |
29+
if git diff --quiet flake.lock; then
30+
echo "changed=false" >> $GITHUB_OUTPUT
31+
else
32+
echo "changed=true" >> $GITHUB_OUTPUT
33+
fi
34+
35+
- name: Create Pull Request
36+
id: create-pr
37+
if: steps.check-changes.outputs.changed == 'true'
38+
uses: peter-evans/create-pull-request@22a9089034f40e5a961c8808d113e2c98fb63676 # v7.0.11
39+
with:
40+
token: ${{ secrets.GITHUB_TOKEN }}
41+
commit-message: "chore(deps): update nix flake inputs"
42+
title: "chore(deps): update nix flake inputs"
43+
body: |
44+
## Summary
45+
- Automated update of Nix flake inputs (`nixpkgs`, `flake-parts`)
46+
47+
## Test plan
48+
- [ ] `nix flake check` passes in CI
49+
- [ ] Development shell works correctly
50+
51+
---
52+
🤖 This PR was automatically created by the scheduled Nix flake update workflow.
53+
branch: chore/nix-flake-update
54+
labels: |
55+
dependencies
56+
nix
57+
delete-branch: true
58+
59+
- name: Enable auto-merge
60+
if: steps.create-pr.outputs.pull-request-number
61+
run: gh pr merge --auto --squash "${{ steps.create-pr.outputs.pull-request-url }}"
62+
env:
63+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)