feat: Test Action
Some checks failed
Build / build (Development) (pull_request) Has been cancelled
Build / build (Testing) (pull_request) Has been cancelled
Build / Determining hosts to build (push) Successful in 43s
Build / build (Testing) (push) Failing after 14m31s
Build / build (Development) (push) Failing after 11m25s
Build / Determining hosts to build (pull_request) Failing after 12m25s

Including commits:
* chore: Disable test workflow
* Determine hosts
* Build each host
* Add NixOS to build step as well
* More specific hostnames
* fix json elements
* try different way
* Debug matrix
* run on push
* use var directly
* fix mappings
* fix mappings
* add toolcache
* Change names and ordere
* Debugging
* Debugging extra step
* Debugging needs outputs
* Debugging needs outputs hosts
* Preserve quotes
* printf escaped
* Using EOF
* test
* escape?
* without json parse
* hardcoding
* change build command
* Testing
This commit is contained in:
Tibo De Peuter 2026-02-06 14:15:19 +01:00
parent 5582384f01
commit c04bce06b6
Signed by: tdpeuter
GPG key ID: 38297DE43F75FFE2
3 changed files with 61 additions and 0 deletions

43
.github/workflows/build.yml vendored Normal file
View file

@ -0,0 +1,43 @@
name: "Build"
on:
pull_request:
push:
jobs:
determine-hosts:
name: "Determining hosts to build"
runs-on: ubuntu-latest
container: catthehacker/ubuntu:act-24.04
outputs:
hosts: ${{ steps.hosts.outputs.hostnames }}
steps:
- uses: actions/checkout@v5
- uses: https://github.com/cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: "Determine hosts"
id: hosts
run: |
hostnames="$(nix eval .#nixosConfigurations --apply builtins.attrNames --json)"
printf "hostnames=%s\n" "${hostnames}" >> "${GITHUB_OUTPUT}"
build:
runs-on: ubuntu-latest
container: catthehacker/ubuntu:act-24.04
needs: determine-hosts
strategy:
matrix:
hostname: [
Development,
Testing
]
steps:
- uses: actions/checkout@v5
- uses: https://github.com/cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: "Build host"
run: |
nix build ".#nixosConfigurations.${{ matrix.hostname }}.config.system.build.toplevel" --verbose

17
.github/workflows/test.yml vendored Normal file
View file

@ -0,0 +1,17 @@
name: "Test"
on:
pull_request:
push:
jobs:
tests:
if: false
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: "My custom step"
run: nix run nixpkgs#hello

1
.gitignore vendored
View file

@ -1 +1,2 @@
.idea
result