From 181fbef34acf51668228e4a9eb69d1be4eaa6dbf Mon Sep 17 00:00:00 2001 From: kierandrewett Date: Sat, 27 Apr 2024 20:56:03 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Use=20IP=20instead=20of=20hostna?= =?UTF-8?q?me=20to=20connect=20over=20SSH?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/actions/run-via-ssh/action.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/actions/run-via-ssh/action.yml b/.github/actions/run-via-ssh/action.yml index b7cefbe..c9ed87b 100644 --- a/.github/actions/run-via-ssh/action.yml +++ b/.github/actions/run-via-ssh/action.yml @@ -44,7 +44,9 @@ runs: - name: Run script shell: bash --noprofile --norc -eo pipefail -ux {0} - run: ssh -t ${{ inputs.ssh_username }}@${{ inputs.ts_hostname }} "${{ inputs.run }}" + run: | + SERVER_IP="$(tailscale ip -6 ${{ inputs.ts_hostname }})" + ssh -t ${{ inputs.ssh_username }}@$SERVER_IP "${{ inputs.run }}" - name: Nuke SSH keys shell: bash --noprofile --norc -eo pipefail -ux {0}