From 541ac7d1f1160b09e036fb4152699c6fd7a3a913 Mon Sep 17 00:00:00 2001 From: "Jason N." <33561705+JasonN3@users.noreply.github.com> Date: Sun, 10 Mar 2024 09:47:26 -0400 Subject: [PATCH] run as post actions --- .github/workflows/build-and-test.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 8976bf8..c58f9ca 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -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)