Skip to content

Commit 25d2611

Browse files
committed
FIX add ports to ssh-keyscan
1 parent d54b992 commit 25d2611

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ inputs:
3232

3333
runs:
3434
using: docker
35-
image: docker://taptap21/docker-remote-deployment-action:v1.0
35+
image: docker://taptap21/docker-remote-deployment-action:v1.1
3636

3737
branding:
3838
icon: send

docker-entrypoint.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,14 @@ ssh-add ~/.ssh/id_rsa
5959

6060

6161
echo "Add known hosts"
62-
#printf '%s %s\n' "$SSH_HOST" "$INPUT_SSH_PUBLIC_KEY" >> /etc/ssh/ssh_known_hosts
63-
ssh-keyscan "$SSH_HOST" >> ~/.ssh/known_hosts
64-
ssh-keyscan "$SSH_HOST" >> /etc/ssh/ssh_known_hosts
62+
ssh-keyscan -p $INPUT_SSH_PORT "$SSH_HOST" >> ~/.ssh/known_hosts
63+
ssh-keyscan -p $INPUT_SSH_PORT "$SSH_HOST" >> /etc/ssh/ssh_known_hosts
6564
# set context
6665
echo "Create docker context"
6766
docker context create staging --docker "host=ssh://$INPUT_REMOTE_DOCKER_HOST:$INPUT_SSH_PORT"
6867
docker context use staging
6968

7069

71-
docker ps
7270
if [ -n "$INPUT_DOCKER_LOGIN_PASSWORD" ] || [ -n "$INPUT_DOCKER_LOGIN_USER" ] || [ -n "$INPUT_DOCKER_LOGIN_REGISTRY" ]; then
7371
echo "Connecting to $INPUT_REMOTE_DOCKER_HOST... Command: docker login"
7472
docker login -u "$INPUT_DOCKER_LOGIN_USER" -p "$INPUT_DOCKER_LOGIN_PASSWORD" "$INPUT_DOCKER_LOGIN_REGISTRY"

0 commit comments

Comments
 (0)