aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/nix.yml
blob: 1a3b0682e170c6a1822b249c3cf13c5b91c7244a (plain)
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
51
52
53
54
55
56
57
58
59
name: Nix

on:
  pull_request:
    types: [opened, synchronize, reopened]
    paths:
      - ".github/workflows/nix.yml"
      - "assets/**"
      - "build.rs"
      - "Cargo.lock"
      - "Cargo.toml"
      - "flake.lock"
      - "flake.nix"
      - "nix/**"
      - "skills/**"
      - "vendor/**"
  push:
    branches: [master]
    paths:
      - ".github/workflows/nix.yml"
      - "assets/**"
      - "build.rs"
      - "Cargo.lock"
      - "Cargo.toml"
      - "flake.lock"
      - "flake.nix"
      - "nix/**"
      - "skills/**"
      - "vendor/**"

permissions:
  contents: read

concurrency:
  group: nix-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
  cancel-in-progress: true

jobs:
  flake-check:
    name: flake check
    runs-on: ubuntu-latest
    timeout-minutes: 15
    steps:
      - name: Checkout
        uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
        with:
          persist-credentials: false

      - name: Install Nix
        uses: cachix/install-nix-action@8aa03977d8d733052d78f4e008a241fd1dbf36b3 # v31.10.6
        with:
          extra_nix_config: |
            experimental-features = nix-command flakes
            always-allow-substitutes = true

      - name: Run Nix flake check
        run: |
          nix flake check --print-build-logs
          nix flake check --all-systems --no-build --print-build-logs