mirror of
https://github.com/JasonN3/build-container-installer.git
synced 2025-12-25 19:07:54 +01:00
run as post actions
This commit is contained in:
parent
476629cee9
commit
541ac7d1f1
1 changed files with 4 additions and 7 deletions
11
.github/workflows/build-and-test.yml
vendored
11
.github/workflows/build-and-test.yml
vendored
|
|
@ -190,6 +190,10 @@ jobs:
|
|||
poweroff
|
||||
user --name=core --groups=wheel --password=foobar
|
||||
%include /usr/share/anaconda/interactive-defaults.ks
|
||||
%post
|
||||
systemctl disable firewalld
|
||||
systemctl enable sshd
|
||||
%end
|
||||
EOF
|
||||
xorriso -dialog on << EOF
|
||||
-indev deploy.iso
|
||||
|
|
@ -227,13 +231,6 @@ jobs:
|
|||
(tail -f vm.stdin | nc localhost 4321 | tee vm.stdout) &
|
||||
|
||||
timeout 30m bash -c "while ! (grep 'login:' vm.stdout); do sleep 1; done"
|
||||
echo "${VM_USER}" >> vm.stdin
|
||||
timeout 30m bash -c "while ! (grep 'Password:' vm.stdout); do sleep 1; done"
|
||||
echo "${VM_Pass}" >> vm.stdin
|
||||
echo > vm.stdout
|
||||
timeout 30m bash -c "while ! (grep '#\|\$' vm.stdout); do sleep 1; done"
|
||||
echo "sudo systemctl start sshd" >> vm.stdin
|
||||
( timeout 30m bash -c "while ! (grep 'Password' vm.stdout); do sleep 1; done" && echo "${VM_PASS}" >> vm.stdin ) || true
|
||||
|
||||
export VM_IP=$({ echo '{"execute": "guest-network-get-interfaces"}'; sleep 2; } | socat unix-connect:/tmp/qga.sock - | jq -r '.return[1]["ip-addresses"][] | select(."ip-address-type"=="ipv4") | .["ip-address"]')
|
||||
if ! (echo > /dev/tcp/${VM_IP}/22)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue