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
This commit is contained in:
Bo-Yi Wu 2023-04-09 17:13:24 +08:00 committed by GitHub
parent c8e0cef94a
commit 43abfa778d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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