diff --git a/build-and-push/action.yaml b/build-and-push/action.yaml index ed6a169..047d5b6 100644 --- a/build-and-push/action.yaml +++ b/build-and-push/action.yaml @@ -64,12 +64,22 @@ runs: env: SSH_KEY: ${{ inputs.ssh_key }} BUILDER_HOST: ${{ inputs.docker_host }} + BUILDER_USER: ${{ inputs.docker_user }} run: | mkdir -p ~/.ssh echo "${SSH_KEY}" > ~/.ssh/id_ed25519 chmod 600 ~/.ssh/id_ed25519 ssh-keyscan "${BUILDER_HOST}" >> ~/.ssh/known_hosts + # Fail fast with a real diagnostic instead of a slow buildx + # "context deadline exceeded" if the runner can't reach / auth to the + # remote docker daemon over SSH. + echo "== probing ssh://${BUILDER_USER}@${BUILDER_HOST} ==" + ssh -o BatchMode=yes -o ConnectTimeout=10 \ + -i ~/.ssh/id_ed25519 \ + "${BUILDER_USER}@${BUILDER_HOST}" \ + 'docker version --format "server={{.Server.Version}}"' + - name: Set up remote Docker Buildx builder shell: bash env: