Skip to content

Commit 76ea5d7

Browse files
committed
update flake automatically
1 parent 1a6ec47 commit 76ea5d7

2 files changed

Lines changed: 41 additions & 3 deletions

File tree

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Update flake lock
2+
3+
on:
4+
schedule:
5+
- cron: "0 8 * * *"
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
update:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Check out repository
16+
uses: actions/checkout@v6
17+
18+
- name: Install Nix
19+
uses: DeterminateSystems/nix-installer-action@main
20+
21+
- name: Update flake.lock
22+
run: nix flake update
23+
24+
- name: Validate flake
25+
run: nix flake check
26+
27+
- name: Commit and push changes
28+
run: |
29+
if git diff --quiet -- flake.lock; then
30+
echo "flake.lock is already up to date"
31+
exit 0
32+
fi
33+
34+
git config user.name "github-actions[bot]"
35+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
36+
git add flake.lock
37+
git commit -m "Update flake.lock"
38+
git push

flake.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)