From 7bf58514dbdd91c9949688650956cb60e92b469b Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Tue, 28 Feb 2023 17:11:47 +0800 Subject: [PATCH] chore(auth): allow set password and private key at same time. (#226) --- .github/workflows/ci.yml | 20 ++++++++++++++++++++ Dockerfile | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 27fe433..2c44c53 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: diff --git a/Dockerfile b/Dockerfile index 6249d23..56289e6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM appleboy/drone-ssh:1.6.8-linux-amd64 +FROM appleboy/drone-ssh COPY entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh