nixos-hypervisor/.forgejo/workflows/demo.yml
Théo Barnouin c0c190e259
Some checks failed
/ test (push) Failing after 2s
Test CI : nixos-rebuild
2024-10-23 18:38:46 +02:00

20 lines
721 B
YAML

---
on: push
jobs:
test:
runs-on: docker
container:
image: nixos/nix:2.24.9
steps:
- name: Clone repo and connect to ssh
run: |
cat /etc/os-release
nix-shell -p git ssh-agents nixos-rebuild
git clone https://"${{ vars.GIT_USER }}":"${{ vars.GIT_PASS }}"@git.le43.eu/tbarnouin/nixos-hypervisor
cd nixos-hypervisor
echo '${{ secrets.SSH_PRIVATE_KEY }}' > id_ed25519.pub
chmod 600 id_ed25519.pub
eval $(ssh-agent -s)
ssh-add id_ed25519.pub
ssh -o StrictHostKeyChecking=accept-new tbarnouin@192.168.1.40 echo "All set !"
nixos-rebuild --target-host root@192.168.1.40 switch --flake .#nginx