- Update the default binary version from 1.8.2 to 1.8.4
- Sync the version reference in the development guide
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* fix: append .exe suffix to Windows binary download filename
The drone-ssh release publishes Windows assets with an .exe suffix
(e.g. drone-ssh-1.8.2-windows-amd64.exe), but entrypoint.sh built the
download filename without it, so every Windows runner failed with a 404
at the download step (ERR_DOWNLOAD_FAILED).
Append .exe when the detected platform is windows. This also keeps the
checksums.txt lookup working on Windows since entries match the exact
asset name. Add a windows-latest CI job that exercises the download,
checksum verification, and binary execution path.
Fixes#417
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* fix: detect Git Bash/MSYS/Cygwin uname output as windows platform
On windows-latest runners, bash steps run under Git Bash where
uname -s reports MINGW64_NT-10.0-<build>, so platform detection
rejected Windows runners with ERR_UNKNOWN_PLATFORM before the
download step was even reached. Map mingw*/msys*/cygwin* to windows.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
* Verify drone-ssh binary checksum after download
Download checksums.txt from the drone-ssh release alongside the binary and verify it. Protects against tampered or corrupted release artifacts.
* refactor: make checksum verification portable across minimal containers
- Detect shasum (Perl) or sha256sum (coreutils/busybox) and fall back
gracefully; warn and skip verification only when neither tool exists,
so container jobs without perl are not broken
- Look up the exact checksums.txt entry for the target binary and
compare hashes directly, avoiding the --ignore-missing flag that
busybox sha256sum does not support
- Fail closed when checksums.txt has no entry for the binary
- Remove checksums.txt after successful verification
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
* refactor: streamline output handling for GITHUB_OUTPUT in workflows
- Write the stdout<<EOF and EOF markers directly to GITHUB_OUTPUT instead of using a group command
- Simplify the process for capturing and appending command output to GITHUB_OUTPUT
fix#403fix#397
Signed-off-by: appleboy <appleboy.tw@gmail.com>
* test: enhance stdout capture and verification in tests
- Add a check to ensure captured stdout is not empty
- Add steps to capture and verify multiline stdout output
- Add verification that specific lines and the username are present in captured output
- Add steps to handle and verify stdout containing special characters and file paths
Signed-off-by: appleboy <appleboy.tw@gmail.com>
* ci: enforce unique occurrence of lines in multiline output validation
- Add a step to verify that lines "Line 1", "Line 2", and "Line 3" each appear exactly once in the multiline output
- Fail the workflow if any line is missing or duplicated
- Confirm successful validation with a message when no duplicates are found
Signed-off-by: appleboy <appleboy.tw@gmail.com>
---------
Signed-off-by: appleboy <appleboy.tw@gmail.com>
- Define specific error codes for common failure scenarios
- Improve platform and architecture error handling by using error codes
- Add check to reuse cached binary if already downloaded
- Enhance download process with better error handling and validation of the downloaded file
- Add post-download version check with error if binary execution fails
Signed-off-by: appleboy <appleboy.tw@gmail.com>
- Add input parameter `curl_insecure` to `action.yml` with a default value of false
- Pass `curl_insecure` input to the action's environment in `action.yml`
- Modify `entrypoint.sh` to conditionally add the `--insecure` option to curl if `INPUT_CURL_INSECURE` is true
Signed-off-by: appleboy <appleboy.tw@gmail.com>
- Add `log_error` function for error handling
- Simplify the detection of client platform and architecture
- Use `log_error` for unsupported platform or architecture handling
- Use consistent quoting for variable expansions
- Improve readability for `curl` and `chmod` commands
- Simplify the commands for running and capturing stdout
Signed-off-by: appleboy <appleboy.tw@gmail.com>
- Update DRONE_SSH_VERSION from 1.7.7 to 1.8.0
- Add missing case statement terminator in detect_client_info function
Signed-off-by: appleboy <appleboy.tw@gmail.com>
- Increase curl retry attempts from 3 to 5
- Add echo statements to display CLI version before and after running the version command
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
- Update drone-ssh Docker image version from `1.7.4` to `1.7.7`
- Update DRONE_SSH_VERSION environment variable default from `1.7.4` to `1.7.7`
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
* 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>