Skip to content

Commit 0b056aa

Browse files
timabellclaude
andcommitted
ci: Add weekly workflow to refresh nix-branch flake
GitHub Actions schedules and workflow_dispatch only fire from the default branch, so the updater for the orphan `nix` branch lives here. Each Monday it checks out `nix`, runs update.py to fetch the latest gitopolis release's SHA256SUMS, and pushes the bumped flake.nix back to `nix` if anything changed. The commit identity used by the workflow is the standard github-actions[bot] one. The email format `<user-id>+<username>@users.noreply.github.com` is GitHub's noreply scheme; `41898282` is the stable user ID for github-actions[bot]. Using this identity gives the auto-bump commits the bot avatar in the GitHub UI and a "Verified" badge (the default GITHUB_TOKEN auto-signs commits made under it), and keeps them visually distinct from human commits in git log. Assisted-by: Claude:Opus-4.7-1M [Claude-Code] Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent cb4f271 commit 0b056aa

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: update-nix-flake
2+
3+
on:
4+
schedule:
5+
- cron: '0 8 * * 1'
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
update:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout nix branch
16+
uses: actions/checkout@v4
17+
with:
18+
ref: nix
19+
20+
- name: Run updater
21+
run: python3 update.py
22+
23+
- name: Commit and push if changed
24+
run: |
25+
if git diff --quiet flake.nix; then
26+
echo "flake.nix unchanged"
27+
exit 0
28+
fi
29+
VERSION=$(grep -oP 'version = "\K[^"]+' flake.nix | head -1)
30+
git config user.name "github-actions[bot]"
31+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
32+
git add flake.nix
33+
git commit -m "chore: update to gitopolis v${VERSION}"
34+
git push

0 commit comments

Comments
 (0)