7 Commits

Author SHA1 Message Date
d91a1af6f5 Fix(envs): set environment variable instead of bash variable (#209)
Some checks failed
remote ssh command / Build (push) Failing after 5s
2023-01-08 09:08:14 +08:00
4a03da89e5 docs: update to v0.1.6
Some checks failed
remote ssh command / Build (push) Failing after 4s
2022-12-09 10:32:49 +08:00
0d5a3d0e48 test: comment the ED25519 ssh testing 2022-12-09 10:17:11 +08:00
db9be1d5f2 use fixed version in documentation (#199) 2022-12-09 10:16:07 +08:00
9a7da95c8c chore(ssh): upgrade to drone 1.6.5 2022-12-09 10:13:56 +08:00
f23dd5c681 docs(readme): Fix typo (#191) 2022-11-26 18:24:18 +08:00
cc051b07ed Update README.md (#188) 2022-10-17 22:00:39 +08:00
3 changed files with 23 additions and 22 deletions

View File

@ -88,6 +88,7 @@ jobs:
echo "I am $BAR, thanks" echo "I am $BAR, thanks"
echo "sha: $SHA" echo "sha: $SHA"
echo "port: $PORT" echo "port: $PORT"
sh test.sh
- name: ssh key passphrase - name: ssh key passphrase
uses: ./ uses: ./
@ -141,11 +142,11 @@ jobs:
-lah -lah
use_insecure_cipher: true use_insecure_cipher: true
- name: SSH ED25519 Private Key # - name: SSH ED25519 Private Key
uses: ./ # uses: ./
with: # with:
host: ${{ secrets.TUNNEL_HOST }} # host: ${{ secrets.TUNNEL_HOST }}
username: ${{ secrets.TUNNEL_USERNAME }} # username: ${{ secrets.TUNNEL_USERNAME }}
key: ${{ secrets.ID_ED25519 }} # key: ${{ secrets.ID_ED25519 }}
port: ${{ secrets.TUNNEL_PORT }} # port: ${{ secrets.TUNNEL_PORT }}
script: whoami # script: whoami

View File

@ -1,4 +1,4 @@
FROM appleboy/drone-ssh:1.6.4-linux-amd64 FROM appleboy/drone-ssh:1.6.8-linux-amd64
COPY entrypoint.sh /entrypoint.sh COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh RUN chmod +x /entrypoint.sh

View File

@ -20,7 +20,7 @@ See [action.yml](./action.yml) for more detailed information.
* `sync` - synchronous execution if multiple hosts, default is false * `sync` - synchronous execution if multiple hosts, default is false
* `timeout` - timeout for ssh to remote host, default is `30s` * `timeout` - timeout for ssh to remote host, default is `30s`
* `command_timeout` - timeout for ssh command, default is `10m` * `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 * `key_path` - path of ssh private key
* `fingerprint` - fingerprint SHA256 of the host public key, default is to skip verification * `fingerprint` - fingerprint SHA256 of the host public key, default is to skip verification
* `script` - execute commands * `script` - execute commands
@ -58,7 +58,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: executing remote ssh commands using password - name: executing remote ssh commands using password
uses: appleboy/ssh-action@master uses: appleboy/ssh-action@v0.1.6
with: with:
host: ${{ secrets.HOST }} host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }} username: ${{ secrets.USERNAME }}
@ -190,7 +190,7 @@ ssh-keygen -t ed25519 -a 200 -C "your_email@example.com"
```yaml ```yaml
- name: executing remote ssh commands using password - name: executing remote ssh commands using password
uses: appleboy/ssh-action@master uses: appleboy/ssh-action@v0.1.6
with: with:
host: ${{ secrets.HOST }} host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }} username: ${{ secrets.USERNAME }}
@ -203,7 +203,7 @@ ssh-keygen -t ed25519 -a 200 -C "your_email@example.com"
```yaml ```yaml
- name: executing remote ssh commands using ssh key - name: executing remote ssh commands using ssh key
uses: appleboy/ssh-action@master uses: appleboy/ssh-action@v0.1.6
with: with:
host: ${{ secrets.HOST }} host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }} username: ${{ secrets.USERNAME }}
@ -216,7 +216,7 @@ ssh-keygen -t ed25519 -a 200 -C "your_email@example.com"
```yaml ```yaml
- name: multiple command - name: multiple command
uses: appleboy/ssh-action@master uses: appleboy/ssh-action@v0.1.6
with: with:
host: ${{ secrets.HOST }} host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }} username: ${{ secrets.USERNAME }}
@ -233,7 +233,7 @@ ssh-keygen -t ed25519 -a 200 -C "your_email@example.com"
```diff ```diff
- name: multiple host - name: multiple host
uses: appleboy/ssh-action@master uses: appleboy/ssh-action@v0.1.6
with: with:
- host: "foo.com" - host: "foo.com"
+ host: "foo.com,bar.com" + host: "foo.com,bar.com"
@ -249,7 +249,7 @@ ssh-keygen -t ed25519 -a 200 -C "your_email@example.com"
```diff ```diff
- name: multiple host - name: multiple host
uses: appleboy/ssh-action@master uses: appleboy/ssh-action@v0.1.6
with: with:
- host: "foo.com" - host: "foo.com"
+ host: "foo.com:1234,bar.com:5678" + host: "foo.com:1234,bar.com:5678"
@ -264,7 +264,7 @@ ssh-keygen -t ed25519 -a 200 -C "your_email@example.com"
```diff ```diff
- name: multiple host - name: multiple host
uses: appleboy/ssh-action@master uses: appleboy/ssh-action@v0.1.6
with: with:
host: "foo.com,bar.com" host: "foo.com,bar.com"
+ sync: true + sync: true
@ -280,7 +280,7 @@ ssh-keygen -t ed25519 -a 200 -C "your_email@example.com"
```diff ```diff
- name: pass environment - name: pass environment
uses: appleboy/ssh-action@master uses: appleboy/ssh-action@v0.1.6
+ env: + env:
+ FOO: "BAR" + FOO: "BAR"
+ BAR: "FOO" + BAR: "FOO"
@ -305,7 +305,7 @@ _Inside `env` object, you need to pass every environment variable as a string, p
```diff ```diff
- name: stop script if command error - name: stop script if command error
uses: appleboy/ssh-action@master uses: appleboy/ssh-action@v0.1.6
with: with:
host: ${{ secrets.HOST }} host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }} username: ${{ secrets.USERNAME }}
@ -358,7 +358,7 @@ Host FooServer
```diff ```diff
- name: ssh proxy command - name: ssh proxy command
uses: appleboy/ssh-action@master uses: appleboy/ssh-action@v0.1.6
with: with:
host: ${{ secrets.HOST }} host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }} username: ${{ secrets.USERNAME }}
@ -381,7 +381,7 @@ It is not uncommon for files to leak from backups or decommissioned hardware, an
```diff ```diff
- name: ssh key passphrase - name: ssh key passphrase
uses: appleboy/ssh-action@master uses: appleboy/ssh-action@v0.1.6
with: with:
host: ${{ secrets.HOST }} host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }} username: ${{ secrets.USERNAME }}
@ -407,7 +407,7 @@ Now you can adjust you config:
```diff ```diff
- name: ssh key passphrase - name: ssh key passphrase
uses: appleboy/ssh-action@master uses: appleboy/ssh-action@v0.1.6
with: with:
host: ${{ secrets.HOST }} host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }} username: ${{ secrets.USERNAME }}