From b2bf19cf1da6f8547928d3d410f5068f3505a8de Mon Sep 17 00:00:00 2001 From: Joey Hafner Date: Thu, 24 Oct 2024 23:39:51 -0700 Subject: [PATCH] #16 Add ping check, don't echo pubkey, run whoami in last step --- .gitea/workflows/vyos-deploy.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/vyos-deploy.yaml b/.gitea/workflows/vyos-deploy.yaml index edcd8997..81db9f65 100644 --- a/.gitea/workflows/vyos-deploy.yaml +++ b/.gitea/workflows/vyos-deploy.yaml @@ -14,19 +14,20 @@ jobs: steps: - name: Checkout Jafner.net repo uses: actions/checkout@v4 - - name: Configure SSH agent + - name: Check network connectivity to host + run: ping -c 1 -t 1 -q 192.168.1.1 + - name: Configure SSH run: | echo -e "${{ secrets.RUNNER_SSH_PRIVATEKEY }}" > /tmp/key chmod 0600 /tmp/key ssh-keygen -y -f /tmp/key > /tmp/key.pub ssh-keygen -l -E sha256 -f /tmp/key.pub - cat /tmp/key.pub mkdir -p ~/.ssh/ && touch ~/.ssh/known_hosts ssh-keyscan 192.168.1.1 > ~/.ssh/known_hosts chmod 0600 ~/.ssh/known_hosts - ssh vyos@192.168.1.1 'echo $(date)' - name: Print running VyOS version run: | + whoami ./vyos.sh op show system image # - name: SSH into host