Skip to content

Commit ebc2f9e

Browse files
committed
revert that terrible idea
1 parent 28c6b60 commit ebc2f9e

2 files changed

Lines changed: 5 additions & 14 deletions

File tree

.github/workflows/DeployDockerImage.yaml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ on:
3737
server_ssh_port:
3838
description: 'The SSH key to use to connect to the server'
3939
required: true
40-
local_host:
41-
description: 'The IP address of the host machine'
42-
required: false
4340

4441
jobs:
4542
deploy:
@@ -67,10 +64,9 @@ jobs:
6764
DOCKER_IMAGE: ${{ inputs.docker_user }}/${{ inputs.image_name }}
6865
DOCKER_TAG: latest
6966
CONTAINER_NAME: ${{ inputs.image_name }}_container
70-
JUMP_HOST: "${{ inputs.deployment_user }}@${{ inputs.server_hostname }}:${{ secrets.server_ssh_port }}"
71-
DEPLOY_HOST: ${{ secrets.local_host }}
67+
DEPLOY_HOST: "${{ inputs.deployment_user }}@${{ inputs.server_hostname }}"
7268
run: |
73-
ssh -J ${{ env.JUMP_HOST }} ${{ inputs.deployment_user }}@${DEPLOY_HOST:-localhost} 'docker pull ${{ env.DOCKER_IMAGE }}:${{ env.DOCKER_TAG }}'
74-
ssh -J ${{ env.JUMP_HOST }} ${{ inputs.deployment_user }}@${DEPLOY_HOST:-localhost} 'docker stop ${{ env.CONTAINER_NAME }} || true'
75-
ssh -J ${{ env.JUMP_HOST }} ${{ inputs.deployment_user }}@${DEPLOY_HOST:-localhost} 'docker rm ${{ env.CONTAINER_NAME }} || true'
76-
ssh -J ${{ env.JUMP_HOST }} ${{ inputs.deployment_user }}@${DEPLOY_HOST:-localhost} 'docker run --restart unless-stopped -d --name ${{ env.CONTAINER_NAME }} -p ${{ inputs.host_port }}:${{ inputs.host_port }}/tcp --env-file .env ${{ inputs.docker_args }} ${{ env.DOCKER_IMAGE }}:${{ env.DOCKER_TAG }}'
69+
ssh -p ${{ secrets.server_ssh_port }} $DEPLOY_HOST 'docker pull ${{ env.DOCKER_IMAGE }}:${{ env.DOCKER_TAG }}'
70+
ssh -p ${{ secrets.server_ssh_port }} $DEPLOY_HOST 'docker stop ${{ env.CONTAINER_NAME }} || true'
71+
ssh -p ${{ secrets.server_ssh_port }} $DEPLOY_HOST 'docker rm ${{ env.CONTAINER_NAME }} || true'
72+
ssh -p ${{ secrets.server_ssh_port }} $DEPLOY_HOST 'docker run --restart unless-stopped -d --name ${{ env.CONTAINER_NAME }} -p ${{ inputs.host_port }}:${{ inputs.host_port }}/tcp --env-file .env ${{ inputs.docker_args }} ${{ env.DOCKER_IMAGE }}:${{ env.DOCKER_TAG }}'

docs/Workflows/DeployDockerImage.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,3 @@ You must set up the following secrets in your GitHub repository to securely stor
5555

5656
- Description: The SSH port to use to connect to the server.
5757
- Example: `22`
58-
59-
`local_host` (Optional):
60-
61-
- Description: The local host to use to connect to the server. Defaults to `localhost`.
62-
- Example: `172.123.0.53`

0 commit comments

Comments
 (0)