From 43abfa778d265c40bab39db5480df768142d9b80 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Sun, 9 Apr 2023 17:13:24 +0800 Subject: [PATCH] ci: add tests for incorrect scp-action authentication (#104) - Add two jobs to `.github/workflows/ci.yml` for testing scp-action with incorrect passwords and keys fix https://github.com/appleboy/scp-action/issues/86 --- .github/workflows/ci.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d6b679c..56839fd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,6 +63,28 @@ jobs: target: "test" use_insecure_cipher: true + - name: correct key but wrong password + uses: appleboy/scp-action@7af00892de6f8397c5c3393cfb3b32ae7f91b94b + with: + host: ${{ secrets.HOST }} + username: ${{ secrets.USERNAME }} + key: ${{ secrets.KEY }} + password: abcdefg + port: ${{ secrets.PORT }} + source: "tests/a.txt,tests/b.txt" + target: "test" + + - name: correct password but wrong key + uses: appleboy/scp-action@7af00892de6f8397c5c3393cfb3b32ae7f91b94b + with: + host: ${{ secrets.HOST }} + username: ${{ secrets.USERNAME }} + key: abcdefg + password: ${{ secrets.PASSWORD }} + port: ${{ secrets.PORT }} + source: "tests/a.txt,tests/b.txt" + target: "test" + deploy: name: deploy artifact runs-on: ubuntu-latest