nixos-hypervisor/.forgejo/workflows/demo.yml

20 lines
677 B
YAML
Raw Normal View History

2024-10-23 17:16:16 +02:00
---
on: push
jobs:
2024-10-23 17:35:49 +02:00
test:
runs-on: docker
container:
image: nixos/nix:2.24.9
steps:
2024-10-23 18:19:15 +02:00
- name: Clone repo and connect to ssh
run: |
nix-shell -p git ssh-agents
2024-10-23 17:56:20 +02:00
git clone https://"${{ vars.GIT_USER }}":"${{ vars.GIT_PASS }}"@git.le43.eu/tbarnouin/nixos-hypervisor
2024-10-23 17:59:10 +02:00
cd nixos-hypervisor
2024-10-23 18:29:11 +02:00
echo '${{ secrets.SSH_PRIVATE_KEY }}' > id_ed25519.pub
chmod 600 id_ed25519.pub
eval $(ssh-agent -s)
2024-10-23 18:29:51 +02:00
ssh-add id_ed25519.pub
2024-10-23 18:34:52 +02:00
ssh -o StrictHostKeyChecking=accept-new tbarnouin@192.168.1.40 echo "All set !"
2024-10-23 18:36:47 +02:00
nixos-rebuild --target-host root@192.168.1.40 switch --flake .#nginx