appleboy / ssh-action

GitHub Actions for executing remote ssh commands.
https://github.com/marketplace/actions/ssh-remote-commands
MIT License
4.82k stars 575 forks source link

Connecting to hetzner server using only ipv6, protocol input does not exist. #336

Open TLTB-DEV opened 2 months ago

TLTB-DEV commented 2 months ago

Describe the bug

When trying to connect with ssh to hetzner server that only supports ipv6 i get this 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/ssh-action@v1.0.3
/usr/bin/docker run --name b7879ee53d8fb984a3890b05befb91f7c90_[2](https://github.com/Operacija-GAMS/main-adapter-be/actions/runs/10819694725/job/30018159299#step:4:2)9237d --label 932b78 --workdir /github/workspace --rm -e "INPUT_HOST" -e "INPUT_USERNAME" -e "INPUT_KEY" -e "INPUT_PORT" -e "INPUT_PROTOCOL" -e "INPUT_DEBUG" -e "INPUT_SCRIPT" -e "INPUT_PASSPHRASE" -e "INPUT_PASSWORD" -e "INPUT_SYNC" -e "INPUT_USE_INSECURE_CIPHER" -e "INPUT_CIPHER" -e "INPUT_TIMEOUT" -e "INPUT_COMMAND_TIMEOUT" -e "INPUT_KEY_PATH" -e "INPUT_FINGERPRINT" -e "INPUT_PROXY_HOST" -e "INPUT_PROXY_PORT" -e "INPUT_PROXY_USERNAME" -e "INPUT_PROXY_PASSWORD" -e "INPUT_PROXY_PASSPHRASE" -e "INPUT_PROXY_TIMEOUT" -e "INPUT_PROXY_KEY" -e "INPUT_PROXY_KEY_PATH" -e "INPUT_PROXY_FINGERPRINT" -e "INPUT_PROXY_CIPHER" -e "INPUT_PROXY_USE_INSECURE_CIPHER" -e "INPUT_SCRIPT_STOP" -e "INPUT_ENVS" -e "INPUT_ENVS_FORMAT" -e "INPUT_ALLENVS" -e "INPUT_REQUEST_PTY" -e "HOME" -e "GITHUB_JOB" -e "GITHUB_REF" -e "GITHUB_SHA" -e "GITHUB_REPOSITORY" -e "GITHUB_REPOSITORY_OWNER" -e "GITHUB_REPOSITORY_OWNER_ID" -e "GITHUB_RUN_ID" -e "GITHUB_RUN_NUMBER" -e 
2024/09/11 [21](https://github.com/Operacija-GAMS/main-adapter-be/actions/runs/10819694725/job/30018159299#step:4:22):08:31 dial tcp6: address tcp/4f8: unknown port
======CMD======
sudo docker login -u *** -p ***
sudo docker pull ***/***:latest
sudo docker stop ***  true
sudo docker rm ***  true
sudo docker run -d --name *** -p 8080:3000 ***/***:latest
======END======
======ENV======
======END======

Github action step

- name: Deploy Docker image to VM
        uses: appleboy/ssh-action@v1.0.3
        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

Related environment

Github correctly gets secrets from the action secrets, but on the version1.0.3 there is no protocol input.

appleboy commented 2 months ago
protocol: tcp6

only support in the master branch. Please try the appleboy/ssh-action@master version.