feat: add eval workflow (again)
This commit is contained in:
parent
0ec6ffb4c6
commit
142c71aa1d
1 changed files with 45 additions and 0 deletions
45
.forgejo/workflows/eval.yml
Normal file
45
.forgejo/workflows/eval.yml
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
name: Evaluate configurations
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
get-names:
|
||||||
|
name: Get machine names
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
outputs:
|
||||||
|
machines: ${{ steps.machines.outputs.machines }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install Nix
|
||||||
|
uses: cachix/install-nix-action@v30
|
||||||
|
|
||||||
|
- name: Get machine names
|
||||||
|
id: machines
|
||||||
|
run: |
|
||||||
|
names=$(nix eval --json .#nixosConfigurations --apply 'builtins.attrNames')
|
||||||
|
echo "machines=$names" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
eval:
|
||||||
|
name: Evaluate configuration
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: get-names
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
machine: ${{ fromJSON(needs.get-names.outputs.machines) }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install Nix
|
||||||
|
uses: cachix/install-nix-action@v30
|
||||||
|
|
||||||
|
- name: Eval config
|
||||||
|
run: |
|
||||||
|
nix eval --raw .#nixosConfigurations.${{ matrix.machine }}.config.system.build.toplevel
|
Loading…
Add table
Add a link
Reference in a new issue