From e5c07fceef96eb7263a15106c1e71e1cd5cbb7c8 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Mon, 30 Dec 2019 19:50:55 +0800 Subject: [PATCH] support passphrase (#18) * support passphrase Signed-off-by: Bo-Yi Wu --- .github/workflows/ci.yml | 12 ++++++++++++ Dockerfile | 2 +- action.yml | 4 ++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b542471..077a42f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -75,3 +75,15 @@ jobs: script: | echo "I am $FOO, thanks" echo "I am $BAR, thanks" + + - name: ssh key passphrase + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.HOST }} + username: ${{ secrets.USERNAME }} + key: ${{ secrets.SSH2 }} + port: ${{ secrets.PORT }} + passphrase: ${{ secrets.PASSPHRASE }} + script: | + whoami + ls -al diff --git a/Dockerfile b/Dockerfile index 53e99ea..bf2f9c7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM appleboy/drone-ssh:1.5.4-linux-amd64 +FROM appleboy/drone-ssh:1.5.5-linux-amd64 ADD entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh diff --git a/action.yml b/action.yml index 1e73525..f5f425f 100644 --- a/action.yml +++ b/action.yml @@ -7,6 +7,8 @@ inputs: port: description: 'ssh remote port' default: 22 + passphrase: + description: 'ssh key passphrase' username: description: 'ssh username' password: @@ -30,6 +32,8 @@ inputs: description: 'ssh proxy username' proxy_password: description: 'ssh proxy password' + proxy_passphrase: + description: 'ssh proxy key passphrase' proxy_timeout: description: 'timeout for ssh to proxy host' default: "30s"