mirror of
https://github.com/appleboy/ssh-action.git
synced 2025-07-07 18:52:52 +00:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
aa1ecdd19a | |||
bffdd4e1f4 | |||
f4890bec77 | |||
9aaf218321 |
28
README.md
28
README.md
@ -1,6 +1,6 @@
|
|||||||
# 🚀 SSH for GitHub Actions
|
# 🚀 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.
|
Executing remote ssh commands.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: executing remote ssh commands using password
|
name: remote ssh command
|
||||||
uses: appleboy/ssh-action@master
|
on: [push]
|
||||||
with:
|
jobs:
|
||||||
host: ${{ secrets.HOST }}
|
|
||||||
username: ${{ secrets.USERNAME }}
|
build:
|
||||||
password: ${{ secrets.PASSWORD }}
|
name: Build
|
||||||
port: ${{ secrets.PORT }}
|
runs-on: ubuntu-latest
|
||||||
script: whoami
|
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:
|
output:
|
||||||
@ -38,7 +46,7 @@ Successfully executed commands to all host.
|
|||||||
see the [action.yml](./action.yml) file for more detail imformation.
|
see the [action.yml](./action.yml) file for more detail imformation.
|
||||||
|
|
||||||
* host - scp remote host
|
* host - scp remote host
|
||||||
* port - scp remote port
|
* port - scp remote port, default is `22`
|
||||||
* username - scp username
|
* username - scp username
|
||||||
* password - scp password
|
* password - scp password
|
||||||
* timeout - timeout for ssh to remote host, default is `30s`
|
* timeout - timeout for ssh to remote host, default is `30s`
|
||||||
|
@ -6,6 +6,7 @@ inputs:
|
|||||||
description: 'ssh remote host'
|
description: 'ssh remote host'
|
||||||
port:
|
port:
|
||||||
description: 'ssh remote port'
|
description: 'ssh remote port'
|
||||||
|
default: 22
|
||||||
username:
|
username:
|
||||||
description: 'ssh username'
|
description: 'ssh username'
|
||||||
password:
|
password:
|
||||||
|
Reference in New Issue
Block a user