Skip to content

Commit 92075c5

Browse files
committed
Automate flake updates, if tests pass
1 parent 8704706 commit 92075c5

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/flake-update.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Nix Flake Update
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "0 0 * * 0"
7+
8+
jobs:
9+
nix-flake-update:
10+
name: "Nix Flake Update"
11+
runs-on: ubuntu-24.04
12+
permissions:
13+
contents: write
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: DeterminateSystems/determinate-nix-action@main
17+
- name: Update Nix flake inputs
18+
run: nix flake update
19+
- name: Run `nix build`
20+
run: nix build
21+
- name: Run `nix flake check`
22+
run: nix flake check
23+
- name: Commit updated Nix flake
24+
run: |-
25+
git config --global user.email "noreply@localhost"
26+
git config --global user.name "Binary Ninja Update"
27+
if ! git diff --quiet; then
28+
git commit -am "Update Nix flake inputs"
29+
git push
30+
fi

0 commit comments

Comments
 (0)