I am Dockerizing a Node app uploading it to Docker Hub and want to deploy it on my Hetzner server (which uses only IPv6 connection).
The part that I have issues with is SSH-ing to the server through GitHub Actions and running the docker stop, pull and start.
Here is the action I use:
appleboy/[email protected]
with:
host: ${{ secrets.HETZNER_HOST }}
username: ${{ secrets.HETZNER_USERNAME }}
key: ${{ secrets.HETZNER_SSH_KEY }}
port: 22
protocol: tcp6
debug: true
script: |
sudo docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_TOKEN }}
sudo docker pull ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_IMAGE }}:latest
sudo docker stop main true
sudo docker rm main true
sudo docker run -d --name main -p 8080:3000 ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_IMAGE }}:latest
What happens now is I get an error:
Warning: Unexpected input(s) 'protocol', valid inputs are ['entryPoint', 'args', 'host', 'port', 'passphrase', 'username', 'password', 'sync', 'use_insecure_cipher', 'cipher', 'timeout', 'command_timeout', 'key', 'key_path', 'fingerprint', 'proxy_host', 'proxy_port', 'proxy_username', 'proxy_password', 'proxy_passphrase', 'proxy_timeout', 'proxy_key', 'proxy_key_path', 'proxy_fingerprint', 'proxy_cipher', 'proxy_use_insecure_cipher', 'script', 'script_stop', 'envs', 'envs_format', 'debug', 'allenvs', 'request_pty']
Run appleboy/[email protected]
Which makes 0 sense to me, since protocol is one of inputs on this version.
So am I doing anything wrong, I am also open to some kind of different way without using the appleboy action.
6
AS @jonrsharpe pointed out protocol input is not in v1.0.3 so I put appleboy/ssh-action@master and it solved my issues.