-
-
Notifications
You must be signed in to change notification settings - Fork 544
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deployment to multiple hosts with different ports #85
Comments
Try to set up multiple sections like as below:
run parallel |
Yes, that's what we're doing now, but it's not convenient - we have 4 hosts and their number will certainly increase. And the number of lines in the "script" field is more than 10. Maybe we should add the option described above? Or is there some difficulty? |
@saippuakauppias I will take it. |
#85 Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Multiple Hosts with different port - name: multiple host
uses: appleboy/ssh-action@master
with:
- host: "foo.com"
+ host: "foo.com:1234,bar.com:5678"
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
script: |
whoami
ls -al |
@appleboy, I feel like it's not working... Githab action stuck and worked for 6 hours (!!!). Runtime log (stuck on a server with non-standard port):
This was not the first deploy, directories |
I forgot to change the version, so it didn't work the first time, and now it's OK. |
We send the same release to several servers, but for security we use different ports.
Unfortunately, the current implementation does not provide an option to specify a port in the host field - github action falls with an error:
dial tcp: lookup some.hostname.com:6123: no such host
Could you please add such functionality so that we do not duplicate the same code to send the release several times (4 times in our case)?
It would be great if it worked like this:
Let the default port be specified as port 22 or the one that stands in the "port" field, but if the host has its own, you should use it.
Thank you very much!
The text was updated successfully, but these errors were encountered: