revert: restore hard coding of ssh port

This commit is contained in:
2025-09-25 18:05:49 +03:00
parent 473301980a
commit d81fed3e11

View File

@@ -36,7 +36,6 @@ runs:
DOCKER_COMPOSE_PATH: ${{ inputs.docker_compose_path }} DOCKER_COMPOSE_PATH: ${{ inputs.docker_compose_path }}
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
SSH_KNOWN_HOSTS: ${{ secrets.SSH_KNOWN_HOSTS }} SSH_KNOWN_HOSTS: ${{ secrets.SSH_KNOWN_HOSTS }}
SSH_PORT: ${{ secrets.SSH_PORT }}
TIMEOUT: ${{ inputs.timeout }} TIMEOUT: ${{ inputs.timeout }}
# Optional: Set timeout for the entire action # Optional: Set timeout for the entire action
@@ -65,7 +64,7 @@ runs:
echo "${DOCKER_COMPOSE_PATH}" echo "${DOCKER_COMPOSE_PATH}"
echo "${REMOTE_USER}@${REMOTE_HOST}:${DEPLOYMENT_PATH}" echo "${REMOTE_USER}@${REMOTE_HOST}:${DEPLOYMENT_PATH}"
mkdir -p "$(dirname "${DEPLOYMENT_PATH}")" mkdir -p "$(dirname "${DEPLOYMENT_PATH}")"
scp -o StrictHostKeyChecking=yes -P $SSH_PORT \ scp -o StrictHostKeyChecking=yes -P 2223 \
-o UserKnownHostsFile=~/.ssh/known_hosts \ -o UserKnownHostsFile=~/.ssh/known_hosts \
-i ~/.ssh/id_rsa \ -i ~/.ssh/id_rsa \
${DOCKER_COMPOSE_PATH} \ ${DOCKER_COMPOSE_PATH} \
@@ -74,7 +73,7 @@ runs:
- name: Deploy services via SSH - name: Deploy services via SSH
run: | run: |
ssh -o StrictHostKeyChecking=yes -p $SSH_PORT \ ssh -o StrictHostKeyChecking=yes -p 2223 \
-o UserKnownHostsFile=~/.ssh/known_hosts \ -o UserKnownHostsFile=~/.ssh/known_hosts \
-i ~/.ssh/id_rsa \ -i ~/.ssh/id_rsa \
"${REMOTE_USER}@${REMOTE_HOST}" \ "${REMOTE_USER}@${REMOTE_HOST}" \
@@ -83,7 +82,7 @@ runs:
- name: Verify services are running - name: Verify services are running
run: | run: |
ssh -o StrictHostKeyChecking=yes -p $SSH_PORT \ ssh -o StrictHostKeyChecking=yes -p 2223 \
-o UserKnownHostsFile=~/.ssh/known_hosts \ -o UserKnownHostsFile=~/.ssh/known_hosts \
-i ~/.ssh/id_rsa \ -i ~/.ssh/id_rsa \
"${REMOTE_USER}@${REMOTE_HOST}" \ "${REMOTE_USER}@${REMOTE_HOST}" \