Skip to content

Commit

Permalink
Add CI to check build & nix flake
Browse files Browse the repository at this point in the history
  • Loading branch information
Sigmanificient committed Apr 17, 2024
1 parent 48c225a commit f10f9de
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
on:
workflow_dispatch:
push:

jobs:
check_build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
with:
nix_path: nixpkgs=channel:nixos-unstable

- run: |
nix flake show --json \
| nix run nixpkgs#jq .packages \
| sort | uniq \
| grep '"name"' \
| cut -d '"' -f 4 \
| xargs -i nix build .#{} --show-trace
18 changes: 18 additions & 0 deletions .github/workflows/flake-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
on:
workflow_dispatch:
push:
paths:
- "**.nix"
- "**.lock"
- ".github/workflows/nix-build.yml"

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
with:
nix_path: nixpkgs=channel:nixos-unstable

- run: nix flake check --show-trace

0 comments on commit f10f9de

Please sign in to comment.