Compare commits
11 Commits
Author | SHA1 | Date | |
---|---|---|---|
b601429988 | |||
ae2bb3c3dc | |||
7bf58514db | |||
c1965ddd25 | |||
d91a1af6f5 | |||
4a03da89e5 | |||
0d5a3d0e48 | |||
db9be1d5f2 | |||
9a7da95c8c | |||
f23dd5c681 | |||
cc051b07ed |
37
.github/workflows/ci.yml
vendored
37
.github/workflows/ci.yml
vendored
@ -14,6 +14,26 @@ jobs:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v1
|
||||
|
||||
- name: correct password but wrong key
|
||||
uses: ./
|
||||
with:
|
||||
host: ${{ secrets.HOST }}
|
||||
username: ${{ secrets.USERNAME }}
|
||||
password: ${{ secrets.PASSWORD }}
|
||||
key: "1234"
|
||||
port: ${{ secrets.PORT }}
|
||||
script: whoami
|
||||
|
||||
- name: wrong password but correct key
|
||||
uses: ./
|
||||
with:
|
||||
host: ${{ secrets.HOST }}
|
||||
username: ${{ secrets.USERNAME }}
|
||||
password: "abcdef"
|
||||
key: ${{ secrets.KEY }}
|
||||
port: ${{ secrets.PORT }}
|
||||
script: whoami
|
||||
|
||||
- name: executing remote ssh commands using password
|
||||
uses: ./
|
||||
with:
|
||||
@ -88,6 +108,7 @@ jobs:
|
||||
echo "I am $BAR, thanks"
|
||||
echo "sha: $SHA"
|
||||
echo "port: $PORT"
|
||||
sh test.sh
|
||||
|
||||
- name: ssh key passphrase
|
||||
uses: ./
|
||||
@ -141,11 +162,11 @@ jobs:
|
||||
-lah
|
||||
use_insecure_cipher: true
|
||||
|
||||
- name: SSH ED25519 Private Key
|
||||
uses: ./
|
||||
with:
|
||||
host: ${{ secrets.TUNNEL_HOST }}
|
||||
username: ${{ secrets.TUNNEL_USERNAME }}
|
||||
key: ${{ secrets.ID_ED25519 }}
|
||||
port: ${{ secrets.TUNNEL_PORT }}
|
||||
script: whoami
|
||||
# - name: SSH ED25519 Private Key
|
||||
# uses: ./
|
||||
# with:
|
||||
# host: ${{ secrets.TUNNEL_HOST }}
|
||||
# username: ${{ secrets.TUNNEL_USERNAME }}
|
||||
# key: ${{ secrets.ID_ED25519 }}
|
||||
# port: ${{ secrets.TUNNEL_PORT }}
|
||||
# script: whoami
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM appleboy/drone-ssh:1.6.4-linux-amd64
|
||||
FROM appleboy/drone-ssh:1.6.10
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
26
README.md
26
README.md
@ -20,7 +20,7 @@ See [action.yml](./action.yml) for more detailed information.
|
||||
* `sync` - synchronous execution if multiple hosts, default is false
|
||||
* `timeout` - timeout for ssh to remote host, default is `30s`
|
||||
* `command_timeout` - timeout for ssh command, default is `10m`
|
||||
* `key` - content of ssh private key. ex raw content of ~/.ssh/id_rsa
|
||||
* `key` - content of ssh private key. ex raw content of ~/.ssh/id_rsa, remember include the BEGIN and END lines
|
||||
* `key_path` - path of ssh private key
|
||||
* `fingerprint` - fingerprint SHA256 of the host public key, default is to skip verification
|
||||
* `script` - execute commands
|
||||
@ -58,7 +58,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: executing remote ssh commands using password
|
||||
uses: appleboy/ssh-action@master
|
||||
uses: appleboy/ssh-action@v0.1.8
|
||||
with:
|
||||
host: ${{ secrets.HOST }}
|
||||
username: ${{ secrets.USERNAME }}
|
||||
@ -190,7 +190,7 @@ ssh-keygen -t ed25519 -a 200 -C "your_email@example.com"
|
||||
|
||||
```yaml
|
||||
- name: executing remote ssh commands using password
|
||||
uses: appleboy/ssh-action@master
|
||||
uses: appleboy/ssh-action@v0.1.8
|
||||
with:
|
||||
host: ${{ secrets.HOST }}
|
||||
username: ${{ secrets.USERNAME }}
|
||||
@ -203,7 +203,7 @@ ssh-keygen -t ed25519 -a 200 -C "your_email@example.com"
|
||||
|
||||
```yaml
|
||||
- name: executing remote ssh commands using ssh key
|
||||
uses: appleboy/ssh-action@master
|
||||
uses: appleboy/ssh-action@v0.1.8
|
||||
with:
|
||||
host: ${{ secrets.HOST }}
|
||||
username: ${{ secrets.USERNAME }}
|
||||
@ -216,7 +216,7 @@ ssh-keygen -t ed25519 -a 200 -C "your_email@example.com"
|
||||
|
||||
```yaml
|
||||
- name: multiple command
|
||||
uses: appleboy/ssh-action@master
|
||||
uses: appleboy/ssh-action@v0.1.8
|
||||
with:
|
||||
host: ${{ secrets.HOST }}
|
||||
username: ${{ secrets.USERNAME }}
|
||||
@ -233,7 +233,7 @@ ssh-keygen -t ed25519 -a 200 -C "your_email@example.com"
|
||||
|
||||
```diff
|
||||
- name: multiple host
|
||||
uses: appleboy/ssh-action@master
|
||||
uses: appleboy/ssh-action@v0.1.8
|
||||
with:
|
||||
- host: "foo.com"
|
||||
+ host: "foo.com,bar.com"
|
||||
@ -249,7 +249,7 @@ ssh-keygen -t ed25519 -a 200 -C "your_email@example.com"
|
||||
|
||||
```diff
|
||||
- name: multiple host
|
||||
uses: appleboy/ssh-action@master
|
||||
uses: appleboy/ssh-action@v0.1.8
|
||||
with:
|
||||
- host: "foo.com"
|
||||
+ host: "foo.com:1234,bar.com:5678"
|
||||
@ -264,7 +264,7 @@ ssh-keygen -t ed25519 -a 200 -C "your_email@example.com"
|
||||
|
||||
```diff
|
||||
- name: multiple host
|
||||
uses: appleboy/ssh-action@master
|
||||
uses: appleboy/ssh-action@v0.1.8
|
||||
with:
|
||||
host: "foo.com,bar.com"
|
||||
+ sync: true
|
||||
@ -280,7 +280,7 @@ ssh-keygen -t ed25519 -a 200 -C "your_email@example.com"
|
||||
|
||||
```diff
|
||||
- name: pass environment
|
||||
uses: appleboy/ssh-action@master
|
||||
uses: appleboy/ssh-action@v0.1.8
|
||||
+ env:
|
||||
+ FOO: "BAR"
|
||||
+ BAR: "FOO"
|
||||
@ -305,7 +305,7 @@ _Inside `env` object, you need to pass every environment variable as a string, p
|
||||
|
||||
```diff
|
||||
- name: stop script if command error
|
||||
uses: appleboy/ssh-action@master
|
||||
uses: appleboy/ssh-action@v0.1.8
|
||||
with:
|
||||
host: ${{ secrets.HOST }}
|
||||
username: ${{ secrets.USERNAME }}
|
||||
@ -358,7 +358,7 @@ Host FooServer
|
||||
|
||||
```diff
|
||||
- name: ssh proxy command
|
||||
uses: appleboy/ssh-action@master
|
||||
uses: appleboy/ssh-action@v0.1.8
|
||||
with:
|
||||
host: ${{ secrets.HOST }}
|
||||
username: ${{ secrets.USERNAME }}
|
||||
@ -381,7 +381,7 @@ It is not uncommon for files to leak from backups or decommissioned hardware, an
|
||||
|
||||
```diff
|
||||
- name: ssh key passphrase
|
||||
uses: appleboy/ssh-action@master
|
||||
uses: appleboy/ssh-action@v0.1.8
|
||||
with:
|
||||
host: ${{ secrets.HOST }}
|
||||
username: ${{ secrets.USERNAME }}
|
||||
@ -407,7 +407,7 @@ Now you can adjust you config:
|
||||
|
||||
```diff
|
||||
- name: ssh key passphrase
|
||||
uses: appleboy/ssh-action@master
|
||||
uses: appleboy/ssh-action@v0.1.8
|
||||
with:
|
||||
host: ${{ secrets.HOST }}
|
||||
username: ${{ secrets.USERNAME }}
|
||||
|
Reference in New Issue
Block a user