From 488b5d61fdde424867eeddcb997f76a427721a71 Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Sun, 24 Mar 2024 15:34:12 -0400 Subject: [PATCH] switch ssh wait with a script --- .github/workflows/arrow.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/arrow.yml b/.github/workflows/arrow.yml index 628892a..2631e0d 100644 --- a/.github/workflows/arrow.yml +++ b/.github/workflows/arrow.yml @@ -110,10 +110,14 @@ jobs: run: terraform output -raw host_ip - name: Wait on SSH - uses: iFaxity/wait-on-action@v1.1.0 - with: - resource: tcp ${{ steps.host.outputs.stdout }}:22 - interval: 5000 + if: inputs.action == 'create' + run: | + for i in $(seq 1 15); do + if $(nc -z -w 3 ${{ steps.host.outputs.stdout }} 22); then + exit 0 + fi + sleep 10 + done - name: Write Identity Keys to Files if: inputs.action == 'create'