Skip to content

Commit 81263d7

Browse files
authored
Merge branch 'main' into v6
2 parents 91c96c5 + 4b5e7e7 commit 81263d7

File tree

5 files changed

+160
-2
lines changed

5 files changed

+160
-2
lines changed

.github/actions/setup-nix/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ runs:
99
github_access_token: ${{ github.token }}
1010

1111
- name: Cache Nix store
12-
uses: nix-community/cache-nix-action@b426b118b6dc86d6952988d396aa7c6b09776d08 # v7
12+
uses: nix-community/cache-nix-action@b426b118b6dc86d6952988d396aa7c6b09776d08 # v7.0.0
1313
with:
1414
primary-key: nix-${{ runner.os }}
1515

.github/dependabot.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
version: 2
2+
updates:
3+
# npm dependencies (pnpm compatible)
4+
- package-ecosystem: npm
5+
directory: /
6+
schedule:
7+
interval: weekly
8+
day: monday
9+
time: '09:00'
10+
timezone: Europe/London
11+
open-pull-requests-limit: 10
12+
commit-message:
13+
prefix: 'chore(deps)'
14+
labels:
15+
- dependencies
16+
groups:
17+
# Group minor and patch updates together
18+
minor-and-patch:
19+
patterns:
20+
- '*'
21+
update-types:
22+
- minor
23+
- patch
24+
# Ignore major updates for stability (review manually)
25+
ignore:
26+
- dependency-name: '*'
27+
update-types:
28+
- version-update:semver-major
29+
30+
# GitHub Actions dependencies
31+
- package-ecosystem: github-actions
32+
directory: /
33+
schedule:
34+
interval: weekly
35+
day: monday
36+
time: '09:00'
37+
timezone: Europe/London
38+
open-pull-requests-limit: 5
39+
commit-message:
40+
prefix: 'ci(deps)'
41+
labels:
42+
- dependencies
43+
- ci
44+
groups:
45+
actions:
46+
patterns:
47+
- '*'

.github/workflows/claude.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131

3232
- name: Run Claude Code
3333
id: claude
34-
uses: anthropics/claude-code-action@6337623ebba10cf8c8214b507993f8062fd4ccfb # v1.0.22
34+
uses: anthropics/claude-code-action@7145c3e0510bcdbdd29f67cc4a8c1958f1acfa2f # v1.0.27
3535
with:
3636
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
3737
allowed_tools: 'Bash,mcp__context7__resolve-library-id,mcp__context7__get-library-docs'
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Dependabot auto-merge
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- synchronize
8+
- reopened
9+
10+
permissions:
11+
contents: write
12+
pull-requests: write
13+
14+
jobs:
15+
dependabot-auto-merge:
16+
runs-on: ubuntu-latest
17+
if: github.actor == 'dependabot[bot]'
18+
steps:
19+
- name: Fetch Dependabot metadata
20+
id: metadata
21+
uses: dependabot/fetch-metadata@08eff52bf64351f401fb50d4972fa95b9f2c2d1b # v2.4.0
22+
with:
23+
github-token: ${{ secrets.GITHUB_TOKEN }}
24+
25+
- name: Wait for CI to pass
26+
uses: lewagon/wait-on-check-action@3603e826ee561ea102b58accb5ea55a1a7482343 # v1.4.1
27+
with:
28+
ref: ${{ github.event.pull_request.head.sha }}
29+
running-workflow-name: Dependabot auto-merge
30+
repo-token: ${{ secrets.GITHUB_TOKEN }}
31+
wait-interval: 30
32+
33+
# Enable auto-merge for minor/patch updates
34+
# GitHub will wait for required checks and 3-day delay before merging
35+
- name: Enable auto-merge for minor/patch updates
36+
if: steps.metadata.outputs.update-type != 'version-update:semver-major'
37+
run: gh pr merge --auto --squash "$PR_URL"
38+
env:
39+
PR_URL: ${{ github.event.pull_request.html_url }}
40+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
42+
- name: Add comment about merge delay
43+
if: steps.metadata.outputs.update-type != 'version-update:semver-major'
44+
run: |
45+
gh pr comment "$PR_URL" --body "🤖 Auto-merge enabled. This PR will be merged automatically after CI passes and the 3-day waiting period (configured in branch protection rules)."
46+
env:
47+
PR_URL: ${{ github.event.pull_request.html_url }}
48+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
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@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.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@98357b18bf14b5342f975ff684046ec3b2a07725 # v8.0.0
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)