Commit Graph

10 Commits

Author SHA1 Message Date
Bo-Yi Wu
a39b3cce7d
ci: enhance CI/CD pipeline with SSH command execution
- Add a step to execute multiline SSH commands using `appleboy/ssh-action@v1.0.3`

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-06-05 17:00:36 +08:00
Bo-Yi Wu
15b64dc891
ci: enhance CI pipeline with SSH key handling improvements
- Add a job to handle missing SSH key passphrase with `appleboy/ssh-action` and `continue-on-error` set to true

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-06-05 16:16:59 +08:00
Bo-Yi Wu
e40b597081
ci: add GitHub Actions job for SSH key passphrase support
- Add a new job `support-key-passphrase` to the GitHub Actions workflow
- Add steps to the new job for checking out code, adding public and private keys to the environment, and creating a new SSH server
- Add a step to the new job for running an SSH command with a passphrase
- Add a new private SSH key file `id_passphrase` to the test data
- Add a new public SSH key file `id_passphrase.pub` to the test data

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-06-05 16:13:42 +08:00
Bo-Yi Wu
f05aefe351
ci: enhance SSH action configuration and error handling
- Add a step to stop the script if a command error occurs using `appleboy/ssh-action@v1.0.3`
- Configure SSH action with host, username, password, key, port, and other parameters
- Add script to create a directory and list its contents

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-06-05 15:59:32 +08:00
Bo-Yi Wu
acd41e5091
ci: enhance SSH job testing with varied key/password scenarios
- Correct the name of the SSH job from "ssh by private" to "ssh by private key"
- Add a job to test SSH with the correct key but wrong password
- Add a job to test SSH with the correct password but wrong key

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-06-05 15:57:27 +08:00
Bo-Yi Wu
da612c8015
refactor: optimize CI pipeline for faster execution
- Reduce sleep duration from 3 seconds to 2 seconds
- Rename SSH job steps for clarity
- Change port mapping from 2223 to 2222

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-06-05 15:54:35 +08:00
Bo-Yi Wu
2eeab5bdba
ci: refactor GitHub Actions key management
- Add steps to set public and private keys in GitHub Actions environment
- Replace inline public key assignment with environment variable reference
- Remove redundant steps for setting private key in GitHub Actions environment

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-06-05 15:53:33 +08:00
Bo-Yi Wu
977b74a12d
ci: enhance CI workflow with SSH job and optimizations
- Remove an empty line in the jobs section
- Reduce sleep duration from 5 seconds to 3 seconds
- Add a new job `check-ssh-key` to the workflow
- Add steps to create a new SSH server using Docker
- Add steps to set environment variables for remote host and private key
- Add a step to execute remote SSH commands using the `appleboy/ssh-action` GitHub Action

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-06-05 14:54:29 +08:00
Bo-Yi Wu
0b0e77098a
ci: optimize and enhance SSH server workflow
- Add a 5-second sleep command to the SSH server workflow

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-06-05 13:54:09 +08:00
Bo-Yi Wu
40aad53c5a
ci: add SSH authentication setup for GitHub Actions
- Add a GitHub Action workflow to set up an OpenSSH server using Docker
- Add RSA private key for SSH authentication in test data
- Add RSA public key for SSH authentication in test data
- Add OpenSSH private key for SSH authentication in test data
- Add OpenSSH public key for SSH authentication in test data

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-06-05 13:34:57 +08:00