mirror of
https://github.com/appleboy/ssh-action.git
synced 2026-08-31 15:55:17 +08:00
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>
This commit is contained in:
parent
ca58dd0ce3
commit
f293264524
14
.github/workflows/main.yml
vendored
14
.github/workflows/main.yml
vendored
@ -793,6 +793,20 @@ jobs:
|
|||||||
echo "Output contains 'True'"
|
echo "Output contains 'True'"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
windows-binary-download:
|
||||||
|
runs-on: windows-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
|
||||||
|
- name: test binary download and checksum verification
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
export GITHUB_ACTION_PATH="$PWD"
|
||||||
|
export INPUT_CURL_INSECURE=false
|
||||||
|
export INPUT_CAPTURE_STDOUT=false
|
||||||
|
./entrypoint.sh --help
|
||||||
|
|
||||||
testing-script-error:
|
testing-script-error:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
@ -39,6 +39,10 @@ function detect_client_info() {
|
|||||||
detect_client_info
|
detect_client_info
|
||||||
DOWNLOAD_URL_PREFIX="${DRONE_SSH_RELEASE_URL}/v${DRONE_SSH_VERSION}"
|
DOWNLOAD_URL_PREFIX="${DRONE_SSH_RELEASE_URL}/v${DRONE_SSH_VERSION}"
|
||||||
CLIENT_BINARY="drone-ssh-${DRONE_SSH_VERSION}-${CLIENT_PLATFORM}-${CLIENT_ARCH}"
|
CLIENT_BINARY="drone-ssh-${DRONE_SSH_VERSION}-${CLIENT_PLATFORM}-${CLIENT_ARCH}"
|
||||||
|
# Windows release assets are published with an .exe suffix
|
||||||
|
if [[ "${CLIENT_PLATFORM}" == "windows" ]]; then
|
||||||
|
CLIENT_BINARY="${CLIENT_BINARY}.exe"
|
||||||
|
fi
|
||||||
TARGET="${GITHUB_ACTION_PATH}/${CLIENT_BINARY}"
|
TARGET="${GITHUB_ACTION_PATH}/${CLIENT_BINARY}"
|
||||||
|
|
||||||
# Check if binary already exists and is executable (caching)
|
# Check if binary already exists and is executable (caching)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user