diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..2a1fb35 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,34 @@ +name: "Build" +on: + pull_request: + +jobs: + determine_hosts: + name: "Determining hosts to build" + runs-on: ubuntu-latest + container: + image: catthehacker/ubuntu:act-latest + + steps: + - uses: actions/checkout@v5 + - uses: https://github.com/cachix/install-nix-action@v31 + with: + nix_path: nixpkgs=channel:nixos-unstable + - name: "List hosts" + id: hosts + run: nix eval .#nixosConfigurations --apply builtins.attrNames --json + outputs: + hosts: ${{ steps.hosts.outputs }} + + build: + runs-on: ubuntu-latest + container: + image: catthehacker/ubuntu:act-latest + needs: determine_hosts + strategy: + matrix: + hostname: ${{ fromJSON(needs.determine_hosts.outputs.hosts) }} + + steps: + - run: echo "${{ matrix.hostname }}" + diff --git a/.gitignore b/.gitignore index 485dee6..8daf605 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ .idea +result