mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 17:49:07 +01:00
workflows/ci: Also build packages
This commit is contained in:
parent
1f4283eb7b
commit
0da43226ed
1 changed files with 25 additions and 0 deletions
25
.github/workflows/ci.yml
vendored
25
.github/workflows/ci.yml
vendored
|
|
@ -7,6 +7,7 @@ jobs:
|
||||||
parse-flake:
|
parse-flake:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
|
packages: ${{ steps.packages.outputs.packages }}
|
||||||
checks: ${{ steps.checks.outputs.checks }}
|
checks: ${{ steps.checks.outputs.checks }}
|
||||||
servers: ${{ steps.servers.outputs.servers }}
|
servers: ${{ steps.servers.outputs.servers }}
|
||||||
workstations: ${{ steps.workstations.outputs.workstations }}
|
workstations: ${{ steps.workstations.outputs.workstations }}
|
||||||
|
|
@ -15,6 +16,11 @@ jobs:
|
||||||
- uses: cachix/install-nix-action@v31
|
- uses: cachix/install-nix-action@v31
|
||||||
with:
|
with:
|
||||||
extra_nix_config: experimental-features = nix-command flakes pipe-operators
|
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
|
- name: Get checks
|
||||||
id: checks
|
id: checks
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -38,6 +44,25 @@ jobs:
|
||||||
|> builtins.filter (name: !configs.${name}.config.custom.services.comin.enable)
|
|> builtins.filter (name: !configs.${name}.config.custom.services.comin.enable)
|
||||||
' --json)
|
' --json)
|
||||||
printf "workstations=%s" "$workstations" >> "$GITHUB_OUTPUT"
|
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:
|
build-check:
|
||||||
needs: parse-flake
|
needs: parse-flake
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue