Skip to content

Commit 4dc9220

Browse files
committed
workflows
1 parent 2ca00ee commit 4dc9220

File tree

3 files changed

+49
-16
lines changed

3 files changed

+49
-16
lines changed

.github/workflows/flake-check.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Flake Check
2+
3+
on:
4+
workflow_run:
5+
workflows: ["Flake Update"]
6+
types:
7+
- completed
8+
push:
9+
branches:
10+
- main
11+
12+
jobs:
13+
update:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: write
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
21+
- name: Install Nix
22+
uses: cachix/install-nix-action@v23
23+
with:
24+
nix_path: nixpkgs=channel:nixos-unstable
25+
26+
- name: Install Nix Linting and Formatting Tools
27+
run: nix-env -i statix nixpkgs-fmt -f '<nixpkgs>'
28+
29+
- name: Flake update
30+
run: nix flake update
31+
32+
- name: Run Statix Lint
33+
run: statix fix
34+
35+
- name: Run Nix Format
36+
run: nixpkgs-fmt .
37+
38+
39+
- name: Flake update
40+
run: nix flake check --all-systems

.github/workflows/flake-info.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,9 @@ name: Flake Info
33
on:
44
workflow_dispatch:
55
workflow_run:
6-
workflows: ["Flake Update"]
6+
workflows: ["Flake Check"]
77
types:
88
- completed
9-
push:
10-
branches:
11-
- main
129

1310
jobs:
1411
flake-info:

.github/workflows/update.yml renamed to .github/workflows/flake-update.yml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
name: Nix Flake Check
1+
name: Nix Flake Update
22

3-
on: [push, pull_request]
3+
on:
4+
schedule:
5+
- cron: '0 0 * * *'
46

57
jobs:
68
update:
@@ -15,18 +17,12 @@ jobs:
1517
uses: cachix/install-nix-action@v23
1618
with:
1719
nix_path: nixpkgs=channel:nixos-unstable
18-
19-
- name: Install Nix Linting and Formatting Tools
20-
run: nix-env -i statix nixpkgs-fmt -f '<nixpkgs>'
21-
22-
- name: Flake update
20+
21+
- name: Flake Update
2322
run: nix flake update
2423

25-
- name: Run Statix Lint
26-
run: statix fix
27-
28-
- name: Run Nix Format
29-
run: nixpkgs-fmt .
24+
- name: Manaul Flake check
25+
run: nix flake check
3026

3127
- name: Nix Flake Checker
3228
# You may pin to the exact commit or the version.

0 commit comments

Comments
 (0)