forked from Bos55/nix-config
More specific hostnames
This commit is contained in:
parent
60fe8110b1
commit
bfbe4204e7
1 changed files with 4 additions and 3 deletions
7
.github/workflows/build.yml
vendored
7
.github/workflows/build.yml
vendored
|
|
@ -17,7 +17,8 @@ jobs:
|
||||||
- name: "List hosts"
|
- name: "List hosts"
|
||||||
id: hosts
|
id: hosts
|
||||||
run: |
|
run: |
|
||||||
nix eval .#nixosConfigurations --apply builtins.attrNames --json
|
hosts="$(nix eval .#nixosConfigurations --apply builtins.attrNames --json)"
|
||||||
|
echo "hostnames=${hosts}" >> "$GITHUB_OUTPUT"
|
||||||
outputs:
|
outputs:
|
||||||
hosts: ${{ steps.hosts.outputs }}
|
hosts: ${{ steps.hosts.outputs }}
|
||||||
|
|
||||||
|
|
@ -28,7 +29,7 @@ jobs:
|
||||||
needs: determine_hosts
|
needs: determine_hosts
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
hostname: ${{ fromJSON(needs.determine_hosts.outputs.hosts) }}
|
hostname: ${{ fromJSON(needs.determine_hosts.outputs.hosts.hostnames) }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v5
|
||||||
|
|
@ -39,7 +40,7 @@ jobs:
|
||||||
env:
|
env:
|
||||||
hostname: ${{ matrix.hostname }}
|
hostname: ${{ matrix.hostname }}
|
||||||
run: |
|
run: |
|
||||||
echo "${hostname}"
|
echo "Hostname: ${hostname}"
|
||||||
- run: |
|
- run: |
|
||||||
nixos-rebuild build --flake ".#${hostname}"
|
nixos-rebuild build --flake ".#${hostname}"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue