workflows/ci: Also build packages

This commit is contained in:
SebastianStork 2026-02-27 20:00:30 +01:00
parent 1f4283eb7b
commit 0da43226ed
Signed by: SebastianStork
SSH key fingerprint: SHA256:tRrGdjYOwgHxpSc/wTOZQZEjxcb15P0tyXRsbAfd+2Q

View file

@ -7,6 +7,7 @@ jobs:
parse-flake:
runs-on: ubuntu-latest
outputs:
packages: ${{ steps.packages.outputs.packages }}
checks: ${{ steps.checks.outputs.checks }}
servers: ${{ steps.servers.outputs.servers }}
workstations: ${{ steps.workstations.outputs.workstations }}
@ -15,6 +16,11 @@ jobs:
- uses: cachix/install-nix-action@v31
with:
extra_nix_config: experimental-features = nix-command flakes pipe-operators
- name: Get packages
id: packages
run: |
packages=$(nix flake show --json | jq -c '.packages."x86_64-linux" | keys')
printf "packages=%s" "$packages" >> "$GITHUB_OUTPUT"
- name: Get checks
id: checks
run: |
@ -38,6 +44,25 @@ jobs:
|> builtins.filter (name: !configs.${name}.config.custom.services.comin.enable)
' --json)
printf "workstations=%s" "$workstations" >> "$GITHUB_OUTPUT"
build-package:
needs: parse-flake
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package: ${{ fromJson(needs.parse-flake.outputs.packages) }}
steps:
- uses: actions/checkout@v5
- uses: cachix/install-nix-action@v31
with:
extra_nix_config: experimental-features = nix-command flakes pipe-operators
- uses: cachix/cachix-action@v15
with:
name: sebastian-stork
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
useDaemon: false
- name: Build package
run: nix build .#packages.x86_64-linux.${{ matrix.package }} --print-build-logs
build-check:
needs: parse-flake
runs-on: ubuntu-latest