Commit graph

9 commits

Author SHA1 Message Date
Bo-Yi Wu
86aa40ddb7
ci: add SSH server testing to GitHub Actions workflow
- Add a new job `testing-script-error` to the GitHub Actions workflow
- Use `actions/checkout@v4` to check out the code
- Create and run a new SSH server container using `lscr.io/linuxserver/openssh-server:latest`
- Capture the container's IP address and set it as an environment variable
- Add a step to test script errors with `continue-on-error: true`
- Configure the test script to connect to the SSH server and run a command that will fail (`ls /nonexistent`)

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2025-01-03 09:31:39 +08:00
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>
2024-12-05 16:23:32 +08:00
Jesse
102c0d2e5f
feat: capture stdout and store as output (#287) 2024-12-04 09:49:35 +08:00
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>
2024-12-02 23:19:33 +08:00
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>
2024-12-02 21:25:26 +08:00
Kyle Leonhard
362a7f1677
chore: support running commands from a file (#341) 2024-11-17 14:57:46 +08:00
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>
2024-10-24 01:27:03 +08:00
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>
2024-07-20 13:32:11 +08:00
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>
2024-07-14 17:19:13 +08:00
Renamed from .github/workflows/ci.yml (Browse further)