Skip to content

Commit

Permalink
chore(file): update target file
Browse files Browse the repository at this point in the history
Signed-off-by: appleboy <appleboy.tw@gmail.com>
  • Loading branch information
appleboy committed Mar 16, 2024
1 parent fe44be0 commit 1991c55
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ set -o pipefail

export GITHUB="true"

GITHUB_ACTION_PATH="${GITHUB_ACTION_PATH%/}"
DRONE_SSH_RELEASE_URL="${DRONE_SSH_RELEASE_URL:-https://github.com/appleboy/drone-ssh/releases/download}"
DRONE_SSH_VERSION="${DRONE_SSH_VERSION:-1.7.4}"

Expand Down Expand Up @@ -36,8 +37,6 @@ function detect_client_info() {
if [ -n "${SSH_CLIENT_ARCH-}" ]; then
CLIENT_ARCH="${SSH_CLIENT_ARCH}"
else
# TODO: migrate the kube::util::host_platform function out of hack/lib and
# use it here.
local machine
machine="$(uname -m)"
case "${machine}" in
Expand All @@ -60,7 +59,8 @@ function detect_client_info() {
detect_client_info
DOWNLOAD_URL_PREFIX="${DRONE_SSH_RELEASE_URL}/v${DRONE_SSH_VERSION}"
CLIENT_BINARY="drone-ssh-${DRONE_SSH_VERSION}-${CLIENT_PLATFORM}-${CLIENT_ARCH}"
TARGET="${GITHUB_ACTION_PATH}/${CLIENT_BINARY}"
echo "Will download ${CLIENT_BINARY} from ${DOWNLOAD_URL_PREFIX}"
curl -fL --retry 3 --keepalive-time 2 "${DOWNLOAD_URL_PREFIX}/${CLIENT_BINARY}" -o ${GITHUB_ACTION_PATH}/drone-ssh
chmod +x ${GITHUB_ACTION_PATH}drone-ssh
sh -c "${GITHUB_ACTION_PATH}/drone-ssh $*"
curl -fL --retry 3 --keepalive-time 2 "${DOWNLOAD_URL_PREFIX}/${CLIENT_BINARY}" -o ${TARGET}
chmod +x ${TARGET}
sh -c "${TARGET} $*"

0 comments on commit 1991c55

Please sign in to comment.