From 99ff30f351bc3dfffdff9f38caffb525e59b0f7e Mon Sep 17 00:00:00 2001 From: Vincent Fu Date: Thu, 19 Sep 2024 18:56:53 +0000 Subject: [PATCH] ci: use wait-for-it instead of just waiting for 10s Signed-off-by: Vincent Fu --- .github/actions/start-vm/action.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/actions/start-vm/action.yml b/.github/actions/start-vm/action.yml index 9550e7a93b..e8484460c3 100644 --- a/.github/actions/start-vm/action.yml +++ b/.github/actions/start-vm/action.yml @@ -25,6 +25,9 @@ inputs: runs: using: "composite" steps: + - name: install wait-for-it + run: sudo apt install -y wait-for-it + shell: bash - name: Start VM in background run: | ${{ inputs.qemu }} \ @@ -43,7 +46,7 @@ runs: env: SSHCMD: ssh root@localhost -p ${{ inputs.ssh_fwd_port }} - name: Wait for VM to boot - run: sleep 10 + run: wait-for-it localhost:${{ inputs.ssh_fwd_port }} -t 15 shell: bash - name: Add guest host key to known_hosts run: |