-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (35 loc) · 1.09 KB
/
check.yml
File metadata and controls
38 lines (35 loc) · 1.09 KB
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
name: "check flake"
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
outputs:
outputs: ${{ steps.gen_output.outputs.outputs }}
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install nix
uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/heads/nixos-unstable.tar.gz
extra_nix_config: |
experimental-features = nix-command flakes
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- name: Check flake
run: nix flake check --all-systems
- name: Get outputs
id: gen_output
run: echo "outputs=$(nix flake show --json | jq -c '.nixosConfigurations | keys | map("nixosConfigurations.\(.).config.system.build.toplevel")')" >> "$GITHUB_OUTPUT"
cache:
needs: build
strategy:
matrix:
output: ${{fromJson(needs.build.outputs.outputs)}}
uses: ./.github/workflows/cache.yml
with:
output: ${{ matrix.output }}
secrets: inherit