try with a for loop

This commit is contained in:
Daylin Morgan 2024-01-24 00:11:55 -06:00
parent 64f31f3080
commit 8893df6a89
Signed by: daylin
GPG Key ID: C1E52E7DD81DF79F
1 changed files with 15 additions and 10 deletions

View File

@ -7,15 +7,17 @@ on:
pull_request: pull_request:
branches: branches:
- main - main
env:
HOSTS: "algiz othalan mannaz"
jobs: jobs:
build: build:
strategy: # strategy:
matrix: # matrix:
host: ["algiz", "othalan", "mannaz"] # hosts: "algiz othalan mannaz"
# try to use the cache here along the way # try to use the cache here along the way
fail-fast: true # fail-fast: true
max-parallel: 1 # max-parallel: 1
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
# free up some space # free up some space
@ -32,11 +34,14 @@ jobs:
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Build - name: Build
run: | run: |
cachix watch-exec daylin -- \ for host in "$HOSTS"
nix build \ do
'.#nixosConfigurations.${{ matrix.host }}.config.system.build.toplevel' \ cachix watch-exec daylin -- \
--accept-flake-config \ nix build \
--print-build-logs ".#nixosConfigurations.$host.config.system.build.toplevel" \
--accept-flake-config \
--print-build-logs
done
- name: Push - name: Push
env: env:
CACHIX_ACTIVATE_TOKEN: "${{ secrets.CACHIX_ACTIVATE_TOKEN }}" CACHIX_ACTIVATE_TOKEN: "${{ secrets.CACHIX_ACTIVATE_TOKEN }}"