Skip to content

Commit

Permalink
Merge pull request #770 from socallinuxexpo/ci/add-package-and-nixos-…
Browse files Browse the repository at this point in the history
…builds

[READY] ci: add package and nixos config builds
  • Loading branch information
sarcasticadmin authored Sep 22, 2024
2 parents 5d4e966 + fcd3946 commit 5fb98c9
Showing 1 changed file with 41 additions and 2 deletions.
43 changes: 41 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on:
- master
workflow_dispatch:
jobs:
validate_datafiles:
name: ci_core
nix_checks:
name: nix checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -18,4 +18,43 @@ jobs:
- run: nix build -L .#checks.x86_64-linux.perl-switches
- run: nix build -L .#checks.x86_64-linux.openwrt-golden
- run: nix build -L .#checks.x86_64-linux.formatting
nix_builds:
name: nix builds
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- run: nix build -L .#massflash
- run: nix build -L .#scaleInventory
- run: nix build -L .#serverspec
nixos_configs_get:
name: nixos configurations get name
runs-on: ubuntu-latest
outputs:
nixosconfignames: ${{ steps.nixosconfigsget.outputs.nixosconfignames }}
steps:
- uses: actions/checkout@v3
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Get all NixOS configurations
id: nixosconfigsget
run: |
nixosconfignames=$(nix eval .\#nixosConfigurations --apply builtins.attrNames --json)
echo "$nixosconfignames"
echo "nixosconfignames=$nixosconfignames" >> $GITHUB_OUTPUT
nixos_configs_build:
name: build ${{ matrix.configName }} nixos configuration
needs: nixos_configs_get
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
configName: ${{ fromJSON(needs.nixos_configs_get.outputs.nixosconfignames) }}
steps:
- uses: actions/checkout@v3
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Build ${{ matrix.configName }} nixos configuration
run: |
nix build -L .#nixosConfigurations.${{ matrix.configName }}.config.system.build.toplevel

0 comments on commit 5fb98c9

Please sign in to comment.