|
|
|
@@ -1,6 +1,6 @@
|
|
|
|
|
# 🚀 SSH for GitHub Actions
|
|
|
|
|
|
|
|
|
|
[GitHub Action](https://developer.github.com/actions/) for executing remote ssh commands.
|
|
|
|
|
[GitHub Action](https://github.com/features/actions) for executing remote ssh commands.
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
@@ -11,14 +11,22 @@
|
|
|
|
|
Executing remote ssh commands.
|
|
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
|
- name: executing remote ssh commands using password
|
|
|
|
|
uses: appleboy/ssh-action@master
|
|
|
|
|
with:
|
|
|
|
|
host: ${{ secrets.HOST }}
|
|
|
|
|
username: ${{ secrets.USERNAME }}
|
|
|
|
|
password: ${{ secrets.PASSWORD }}
|
|
|
|
|
port: ${{ secrets.PORT }}
|
|
|
|
|
script: whoami
|
|
|
|
|
name: remote ssh command
|
|
|
|
|
on: [push]
|
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
|
|
build:
|
|
|
|
|
name: Build
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
steps:
|
|
|
|
|
- name: executing remote ssh commands using password
|
|
|
|
|
uses: appleboy/ssh-action@master
|
|
|
|
|
with:
|
|
|
|
|
host: ${{ secrets.HOST }}
|
|
|
|
|
username: ${{ secrets.USERNAME }}
|
|
|
|
|
password: ${{ secrets.PASSWORD }}
|
|
|
|
|
port: ${{ secrets.PORT }}
|
|
|
|
|
script: whoami
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
output:
|
|
|
|
@@ -38,7 +46,7 @@ Successfully executed commands to all host.
|
|
|
|
|
see the [action.yml](./action.yml) file for more detail imformation.
|
|
|
|
|
|
|
|
|
|
* host - scp remote host
|
|
|
|
|
* port - scp remote port
|
|
|
|
|
* port - scp remote port, default is `22`
|
|
|
|
|
* username - scp username
|
|
|
|
|
* password - scp password
|
|
|
|
|
* timeout - timeout for ssh to remote host, default is `30s`
|
|
|
|
|