selfhostblocks/.github/workflows/demo.yml
dependabot[bot] f9e943fa76
build(deps): bump actions/checkout from 6 to 7
Bumps [actions/checkout](https://github.com/actions/checkout) from 6 to 7.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-22 14:33:26 +00:00

111 lines
2.7 KiB
YAML

name: Demo
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
jobs:
path-filter:
runs-on: ubuntu-latest
outputs:
changed: ${{ steps.filter.outputs.any_changed }}
steps:
- name: Checkout repository
uses: actions/checkout@v7
- uses: tj-actions/changed-files@v47
id: filter
with:
files: |
demo/**
lib/**
modules/**
!modules/**/docs/**
test/**
flake.lock
flake.nix
.github/workflows/demo.yml
separator: "\n"
- env:
ALL_CHANGED_FILES: ${{ steps.filter.outputs.all_changed_files }}
run: |
echo $ALL_CHANGED_FILES
build:
needs: [ "path-filter" ]
if: needs.path-filter.outputs.changed == 'true'
strategy:
fail-fast: false
matrix:
demo:
- name: homeassistant
flake: basic
- name: homeassistant
flake: ldap
- name: nextcloud
flake: basic
- name: nextcloud
flake: ldap
- name: nextcloud
flake: sso
- name: minimal
flake: minimal
- name: minimal
flake: lowlevel
- name: minimal
flake: sops
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Install Nix
uses: cachix/install-nix-action@v31
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
enable_kvm: true
extra_nix_config: |
keep-outputs = true
keep-failed = true
- uses: cachix/cachix-action@v17
with:
name: selfhostblocks
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Build ${{ matrix.demo.name }} .#${{ matrix.demo.flake }}
run: |
cd demo/${{ matrix.demo.name }}
nix flake update --override-input selfhostblocks ../.. selfhostblocks
nix \
--print-build-logs \
--option keep-going true \
--show-trace \
build .#nixosConfigurations.${{ matrix.demo.flake }}.config.system.build.toplevel
nix \
--print-build-logs \
--option keep-going true \
--show-trace \
build .#nixosConfigurations.${{ matrix.demo.flake }}.config.system.build.vm
result:
runs-on: ubuntu-latest
needs: [ "build" ]
if: '!cancelled()'
steps:
- run: |
result="${{ needs.build.result }}"
if [[ $result == "success" || $result == "skipped" ]]; then
exit 0
else
exit 1
fi