Skip to content

Commit

Permalink
Fix missing support for a custom ssh port
Browse files Browse the repository at this point in the history
  • Loading branch information
JimCronqvist committed Mar 24, 2023
1 parent 23585f7 commit d95a743
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ echo ""
for host in ${INPUT_HOSTS}; do
echo -e "${BLUE}Connecting to ${host}...${NORMAL}"
PORT=$(echo "$host" | cut -s -d':' -f2 | sed 's/[^0-9]//g')
sh -c "ssh -q -t -i ~/.ssh/id_rsa -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no '${host}' -p ${PORT:-22} < ~/script.sh"
sh -c "ssh -q -t -i ~/.ssh/id_rsa -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no '${host%%:*}' -p ${PORT:-22} < ~/script.sh"
echo ""
done

echo ""
echo -e "${BLUE}GitHub Action completed.${NORMAL}"
echo -e "${BLUE}GitHub Action completed.${NORMAL}"

0 comments on commit d95a743

Please sign in to comment.