Skip to content

Commit

Permalink
Remove the dynamic matrix for now
Browse files Browse the repository at this point in the history
Signed-off-by: Benoit Donneaux <[email protected]>
  • Loading branch information
btlogy committed Feb 13, 2025
1 parent 1be989f commit 71f9ae3
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,7 @@ jobs:
- name: Set matrix
id: set-matrix
run: |
# Extract targets from the flake
IFS=","
target_arr=( $(nix eval --json --apply 'builtins.attrNames' .#nixosConfigurations | sed -r -e 's/\[([^\[]+)\]/\1/' -e 's/"//g') )
index=0
size=${#target_arr[@]}
output="matrix={\"include\":["
IFS=" "
for target in ${target_arr[@]}; do
output+="{\"target\":\"${target}\","
output+="\"hostname\":$(nix eval .#nixosConfigurations.${target}.config.networking.hostName),"
output+="\"domain\":$(nix eval .#nixosConfigurations.${target}.config.networking.domain)}"
if [[ $((index++)) -lt $((size -1)) ]]; then
output+=","
fi
done
output+="]}"
echo $output
echo $output >> $GITHUB_OUTPUT
echo 'matrix={"include":[{"target":"webforge","hostname":"webforge","domain":""}]}' >> $GITHUB_OUTPUT
build:
name: Build
Expand Down

0 comments on commit 71f9ae3

Please sign in to comment.