Some checks failed
Activate NixOS Homelab Configuration On Push / build-and-activate (push) Failing after 36s
33 lines
No EOL
728 B
YAML
33 lines
No EOL
728 B
YAML
name: Activate NixOS Homelab Configuration On Push
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
env:
|
|
PATH: /run/current-system/sw/bin:/run/wrappers/bin:/nix/var/nix/profiles/default/bin
|
|
|
|
jobs:
|
|
build-and-activate:
|
|
runs-on: self-hosted
|
|
defaults:
|
|
run:
|
|
shell: /bin/sh -e {0}
|
|
steps:
|
|
- name: Clone
|
|
run: git clone --depth 1 http://localhost:5080/satr14/nix-flake.git src
|
|
|
|
- name: Activate
|
|
run: nixos-rebuild switch --flake ./src#homelab -L
|
|
|
|
- name: Rollback on failure
|
|
if: failure()
|
|
run: nixos-rebuild --rollback
|
|
|
|
- name: Show generation
|
|
run: nixos-version
|
|
|
|
- name: Clean up
|
|
if: always()
|
|
run: rm -rf src |