-
Notifications
You must be signed in to change notification settings - Fork 3.5k
50 lines (50 loc) · 1.31 KB
/
nix-ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
---
name: "Lint And Build Nix Flake"
on:
push:
branches:
- main
pull_request:
paths:
- "flake.nix"
- "flake.lock"
- "go.mod"
- "nix/**"
- .github/workflows/nix-ci.yaml
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v30
with:
nix_path: nixpkgs=channel:nixos-unstable
- run: nix run --print-build-logs .#lint
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v30
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: dorny/paths-filter@v3
id: nix-changes
with:
filters: |
nix:
- 'nix/**'
- 'flake.nix'
- 'flake.lock'
- run: nix run --print-build-logs .#test
if: steps.nix-changes.outputs.nix == 'true'
packages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v30
with:
nix_path: nixpkgs=channel:nixos-unstable
- run: nix build --print-build-logs .#promtail
- run: nix build --print-build-logs .#logcli
- run: nix build --print-build-logs .#loki
- run: nix build --print-build-logs .#loki-canary