Skip to content

Commit f9c76c4

Browse files
ryoppippiglebedelCopilot
authored
ci: add dependabot and nix flake update workflows [ENG-11704] (#71)
* 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 * Apply suggestion from @Copilot Co-authored-by: Copilot <[email protected]> * Apply suggestions from code review Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Guillaume <[email protected]> Co-authored-by: Copilot <[email protected]>
1 parent a755764 commit f9c76c4

File tree

2 files changed

+121
-0
lines changed

2 files changed

+121
-0
lines changed

.github/dependabot.yaml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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+
update-types:
26+
- minor
27+
- patch
28+
ai-frameworks:
29+
patterns:
30+
- "openai*"
31+
- "langchain*"
32+
- "crewai*"
33+
- "mcp*"
34+
update-types:
35+
- minor
36+
- patch
37+
38+
# GitHub Actions
39+
- package-ecosystem: github-actions
40+
directory: /
41+
schedule:
42+
interval: weekly
43+
day: monday
44+
time: "09:00"
45+
timezone: Europe/London
46+
open-pull-requests-limit: 5
47+
commit-message:
48+
prefix: "chore(deps)"
49+
labels:
50+
- dependencies
51+
- github-actions
52+
groups:
53+
actions:
54+
patterns:
55+
- "*"
56+
update-types:
57+
- minor
58+
- 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 (aligns with Dependabot's 09:00 Europe/London schedule in winter; 10:00 Europe/London in summer)
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
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)