Commit Graph

81 Commits (master)

Author SHA1 Message Date
Bo-Yi Wu 66aa4d343b
ci: add SSH testing job to GitHub Actions workflow (#355)
* ci: add SSH testing job to GitHub Actions workflow

https://github.com/appleboy/ssh-action/issues/335#issuecomment-2372414496

- Add a new job `testing-script-stop` to the GitHub Actions workflow
- Set up an SSH server using a Docker container within the new job
- Capture the container's IP address and store it in the GitHub environment
- Add a step to run an SSH command with stdout capture
- Include a script to test conditional logic within the SSH command
- Add a step to check and print the captured stdout from the SSH command

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* ci: improve GitHub Actions workflow with conditional checks

- Add conditional checks in GitHub Actions workflow to handle 'True' and 'False' outputs

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* ci: standardize naming and validation of stdout steps

- Rename `stdout` step to `stdout01` in the GitHub Actions workflow
- Rename `check stdout` step to `check stdout 01`
- Update references to `stdout` to `stdout01` in echo and grep commands
- Add a new step `stdout02` for SSH command execution with stdout capture
- Add a new step `check stdout 02` to validate the output of `stdout02` step

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

---------

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2 weeks ago
Jesse 102c0d2e5f
feat: capture stdout and store as output (#287) 3 weeks ago
Bo-Yi Wu e13c387332
ci(action): display an environment variable with special characters (#351)
- Add a new job `testing07` with steps to set environment variables and create an SSH server container
- Set a special character password in environment variables
- Run a Docker container for an OpenSSH server and capture its IP address
- Add steps to SSH into the server using username and password authentication

Signed-off-by: appleboy <appleboy.tw@gmail.com>
3 weeks ago
Bo-Yi Wu 1c1ad10f6d
ci(action): remove script stop functionality from project (#350)
- Remove the `stop script if command error` step from GitHub workflows
- Remove the `script_stop` option from the README and its translations
- Remove the `script_stop` input from `action.yml`

Signed-off-by: appleboy <appleboy.tw@gmail.com>
3 weeks ago
Kyle Leonhard 43d4ebbb72
chore: Add test to stable workflow for script_path (#347) 1 month ago
appleboy 8fdfeb034e
chore(github): update `appleboy/ssh-action` to version `v1.2.0` across workflows
- Update `appleboy/ssh-action` from version `v1.0.3` to `v1.2.0` in bug report template
- Update `appleboy/ssh-action` from version `v1.0.3` to `v1.2.0` in stable workflow

Signed-off-by: appleboy <appleboy.tw@gmail.com>
1 month ago
Kyle Leonhard 362a7f1677
chore: support running commands from a file (#341) 1 month ago
appleboy 8b84eaec3a
ci(script): improve CI robustness and coverage across environments
- Change single-line script to multi-line bash script with error handling in GitHub Actions workflow

Signed-off-by: appleboy <appleboy.tw@gmail.com>
2 months ago
appleboy 2763143a97
ci(script): enhance CI workflows and API integration
- Change script execution to a multi-line bash script with error handling in GitHub workflow

Signed-off-by: appleboy <appleboy.tw@gmail.com>
2 months ago
appleboy 25ce8cbbcb
ci: implement automated release workflow with GoReleaser
- Add GitHub Actions workflow for GoReleaser
- Configure GoReleaser to skip builds
- Set up changelog groups for features, bug fixes, enhancements, refactors, build process updates, and documentation updates

Signed-off-by: appleboy <appleboy.tw@gmail.com>
3 months ago
Bo-Yi Wu b4a07ca594
ci: enhance GitHub Actions with secret variable support (#330)
* ci: enhance GitHub Actions with secret variable support

- Add a step to pass secret variables in the shell within the GitHub Actions workflow

Signed-off-by: appleboy <appleboy.tw@gmail.com>

* ci: enhance CI workflow and API integration

- Add `continue-on-error: true` to the GitHub Actions workflow

Signed-off-by: appleboy <appleboy.tw@gmail.com>

* ci: improve GitHub Actions workflow reliability

- Add `continue-on-error: true` to the GitHub Actions workflow

Signed-off-by: appleboy <appleboy.tw@gmail.com>

---------

Signed-off-by: appleboy <appleboy.tw@gmail.com>
5 months ago
Bo-Yi Wu 06fa62e61c
ci: rename the workflow files.
- Rename `ci.yml` to `main.yml`
- Rename `ssh-server.yml` to `stable.yml`

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
5 months ago
appleboy 43895f2cd5
ci: refactor SSH testing workflows and job configurations
- Rename workflow from "remote ssh command" to "testing main branch"
- Remove environment variables `FOO` and `BAR`
- Rename job `testing01` to `default-user-name-password`
- Rename step "checkout" to "Checkout code"
- Replace step "correct password but wrong key" with "create new ssh server" using Docker
- Update SSH connection details to use environment variables for host, username, password, and port
- Add new job `check-ssh-key` with steps to add public key to environment and create a new SSH server
- Add new job `support-key-passphrase` with steps to add public key to environment and create a new SSH server
- Add new job `multiple-server` to create and manage multiple SSH servers
- Add new job `support-ed25519-key` with steps to add public key to environment and create a new SSH server
- Add new job `testing-with-env` with steps to add public key to environment and create a new SSH server
- Remove jobs `testing02`, `testing03`, `testing04`, and `testing05`
- Rename workflow in `ssh-server.yml` from "openssh-server" to "testing stable version"

Signed-off-by: appleboy <appleboy.tw@gmail.com>
7 months ago
appleboy b6941ae5d5
ci: refactor codebase and optimize performance
- Delete the GitHub Actions workflow file `version.yml`

Signed-off-by: appleboy <appleboy.tw@gmail.com>
7 months ago
appleboy 0c7561b1a3
fix: switch to SSH key authentication for security
- Remove hardcoded user password from environment variables
- Replace hardcoded password with a private key for SSH authentication

Signed-off-by: appleboy <appleboy.tw@gmail.com>
7 months ago
appleboy 5a8776fd15
ci: switch to password authentication in GitHub workflow
- Replace SSH key authentication with password authentication in GitHub workflow

Signed-off-by: appleboy <appleboy.tw@gmail.com>
7 months ago
appleboy 97f8d752b5
ci: enable root access in CI pipeline
- Change `SUDO_ACCESS` environment variable from `false` to `true`
- Add a step to switch to root user using `appleboy/ssh-action@v1.0.3` with specified parameters and commands

Signed-off-by: appleboy <appleboy.tw@gmail.com>
7 months ago
appleboy 9c32aa61f8
ci: refactor workflows and API integrations
- Remove the execution of `test.sh` from the SSH server workflow

Signed-off-by: appleboy <appleboy.tw@gmail.com>
7 months ago
appleboy f0e5a23d53
ci: add environment variable handling in GitHub Actions
- Add a new job `testing-with-env` to the GitHub Actions workflow
- Add steps to set up environment variables for public and private SSH keys
- Add a step to create a new SSH server using Docker
- Add a step to test the SSH connection using the `id_ed25519` key
- Add a step to pass a single environment variable to the SSH action
- Add a step to pass multiple environment variables to the SSH action
- Add a step to use a custom format for environment variables
- Add a step to pass all environment variables to the SSH action

Signed-off-by: appleboy <appleboy.tw@gmail.com>
7 months ago
appleboy fc1c1fce51
ci: add GitHub Actions job for ed25519 key support
- Add a new job `support-ed25519-key` 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 steps to the new job for testing the `id_ed25519` key using `appleboy/ssh-action`
- Add a new private SSH key file `testdata/.ssh/id_ed25519`
- Add a new public SSH key file `testdata/.ssh/id_ed25519.pub`

Signed-off-by: appleboy <appleboy.tw@gmail.com>
7 months ago
Bo-Yi Wu aa293c24bb
chore: optimize system configuration and API integration
- Change port for REMOTE_HOST_02 from `2223` to `2222`

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
7 months ago
Bo-Yi Wu 378323e4c8
ci: add multi-server support to CI workflow
- Add a new job `multiple-server` to the GitHub Actions workflow
- Configure the job to run on `ubuntu-latest`
- Add steps to checkout code, add public and private keys to environment variables, and create two new SSH servers using Docker
- Update the `host` configuration to include both new SSH servers
- Remove the `port` configuration
- Replace the command `ls -lah` with `whoami`
- Remove the `use_insecure_cipher` configuration

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
7 months ago
Bo-Yi Wu 815c5743ac
ci: enhance deployment with multi-host SSH action
- Add deployment step for multiple hosts with different ports using `appleboy/ssh-action@v1.0.3`

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
7 months ago
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>
7 months ago
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>
7 months ago
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>
7 months ago
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>
7 months ago
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>
7 months ago
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>
7 months ago
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>
7 months ago
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>
7 months ago
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>
7 months ago
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>
7 months ago
appleboy c8594ae37d
ci: implement GitHub Actions for remote SSH execution
- Add example GitHub Actions workflow for executing remote SSH commands using password authentication

Signed-off-by: appleboy <appleboy.tw@gmail.com>
7 months ago
Bo-Yi Wu aabaf1254d
ci: add bug report template 7 months ago
Bo-Yi Wu f916346256
ci: refactor CI workflow and improve robustness (#320)
* ci: refactor CI workflow and improve robustness

- Update GitHub Actions checkout step from version 1 to version 4 in multiple jobs within the CI workflow

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* docs: improve non-interactive shell command handling

- Add a Q&A section to the README with information on resolving 'command not found' errors for non-interactive shells
- Provide a solution involving editing `/etc/bash.bashrc` to ensure commands are added to the path in non-interactive shells

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* docs: improve documentation and CI robustness

- Update acknowledgment for the interactive shell solution in the README.md file

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

---------

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
8 months ago
Bo-Yi Wu 551964ebda
ci: optimize GitHub Actions workflow configuration
- Remove the `testing06` job related to testing IPv6 from the GitHub Actions workflow.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
9 months ago
appleboy d2d6858859
ci: enhance GitHub workflow for SSH actions and deployments
- Add a new GitHub workflow file `version.yml`
- Define environment variables `FOO` and `BAR`
- Add multiple jobs for testing different scenarios
- Include steps for SSH actions using different authentication methods
- Implement scripts for executing remote SSH commands
- Configure SSH key passphrase authentication
- Add a job for using insecure cipher
- Include a job for executing multiline SSH commands
- Implement a job for deployment to multiple hosts with different ports
- Add jobs for passing environment variables to scripts
- Configure custom environment variables format
- Implement a job for passing all ENV variables to a script
- Include jobs for cloning private repositories and logging into container registries
- Implement a job for switching users and testing IPv6 connectivity

Signed-off-by: appleboy <appleboy.tw@gmail.com>
9 months ago
Bo-Yi Wu c78141851a
ci: enhance GitHub Actions for IPv6 and flexibility (#303)
* ci: enhance GitHub Actions for IPv6 and flexibility

- Add a new CI job for testing IPv6 in GitHub Actions workflow
- Update the Docker image version from `1.7.3` to `1.7.4`
- Add a new `protocol` input parameter to the GitHub action with a default value of `tcp`
- Change the GitHub action to use a composite run steps action instead of a Docker container
- Update the `entrypoint.sh` script to use `bash` instead of `sh`, set stricter error handling, and add a function to detect client platform and architecture
- Modify the `entrypoint.sh` script to download a specific version of `drone-ssh` based on the detected client info and execute it

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* ci: refactor CI workflow and Docker setup

- Remove IPv6 ping command from CI workflow
- Uncomment Docker run configuration in action.yml

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

---------

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
9 months ago
Bo-Yi Wu d134a26a1f
fix(sudo): support request_pty to execute sudo command (#288)
- Add a new job called `testing05` to the CI workflow
- Update the base image in the Dockerfile from `1.7.2` to `1.7.3`
- Update the action name, description, and author in the action.yml file
- Update the descriptions for various inputs in the action.yml file
- Add a new input `request_pty` with a description in the action.yml file
- Update the `using` and `image` fields in the action.yml file
- Update the `using` and `image` fields in the runs section of the action.yml file
- Update the `icon` and `color` fields in the branding section of the action.yml file

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
12 months ago
Bo-Yi Wu b9f6bf6223
style: refine CI Workflow and Test Configurations
- Remove empty lines from the GitHub Actions CI workflow file

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
1 year ago
Bo-Yi Wu 5ac43dd762
chore(ssh): pass all ENV variables to script (#259) 1 year ago
Bo-Yi Wu d87d276960
ci: add Docker login and pull job to CI pipeline (#244)
- Add a new job named "testing04" for docker login and pull in ci.yml file.

ref: https://github.com/appleboy/ssh-action/issues/230
2 years ago
Bo-Yi Wu 3130c7a2bc
ci: improve CI workflow for private repository cloning (#241)
- Add a new job for git clone and pull in CI
- Clone a private repository in CI with secrets
- Remove a directory in the cloned repository

ref: https://github.com/appleboy/ssh-action/issues/65
2 years ago
Bo-Yi Wu 334f9259f2
chore: update action configuration for greater flexibility (#240)
- Update base image version from `1.6.12` to `1.6.13` in Dockerfile
- Add `envs_format` input with flexible configuration in action.yml
- Add a line to README.md pointing to action.yml for more information

fix https://github.com/appleboy/ssh-action/issues/213
2 years ago
Bo-Yi Wu 3cd1bcf771
feat: refactor code for parallel execution on multiple hosts (#237)
- Update Dockerfile to use a newer version of `drone-ssh`
- Modify `ci.yml` to use `continue-on-error` instead of commenting out code

fix https://github.com/appleboy/ssh-action/issues/233
2 years ago
Bo-Yi Wu 7bf58514db
chore(auth): allow set password and private key at same time. (#226) 2 years ago
Bo-Yi Wu d91a1af6f5
Fix(envs): set environment variable instead of bash variable (#209) 2 years ago
Bo-Yi Wu 0d5a3d0e48 test: comment the ED25519 ssh testing 2 years ago
Bo-Yi Wu dce9d565de
Update FUNDING.yml 3 years ago