mirror of
https://github.com/appleboy/scp-action.git
synced 2025-09-03 18:46:48 +00:00
feat: avoid redundant binary downloads and notify when skipping (#210)
Some checks failed
v1 version / test deploy artifact (push) Failing after 3s
v1 version / test changed-files (push) Failing after 3s
v1 version / test Multiple Host (push) Failing after 2s
lint and test / test scp action (push) Failing after 2s
lint and test / test changed-files (push) Failing after 2s
lint and test / test target folder (push) Failing after 2s
v1 version / test scp action (push) Failing after 7m27s
v1 version / test target folder (push) Failing after 8m55s
lint and test / test deploy artifact (push) Failing after 10m24s
lint and test / test Multiple Host (push) Failing after 10m52s
Some checks failed
v1 version / test deploy artifact (push) Failing after 3s
v1 version / test changed-files (push) Failing after 3s
v1 version / test Multiple Host (push) Failing after 2s
lint and test / test scp action (push) Failing after 2s
lint and test / test changed-files (push) Failing after 2s
lint and test / test target folder (push) Failing after 2s
v1 version / test scp action (push) Failing after 7m27s
v1 version / test target folder (push) Failing after 8m55s
lint and test / test deploy artifact (push) Failing after 10m24s
lint and test / test Multiple Host (push) Failing after 10m52s
* feat: avoid redundant binary downloads and notify when skipping - Skip downloading the binary if it already exists, and print a message instead Signed-off-by: appleboy <appleboy.tw@gmail.com> * Update entrypoint.sh Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --------- Signed-off-by: appleboy <appleboy.tw@gmail.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
@ -39,8 +39,12 @@ if [[ "${INPUT_CURL_INSECURE}" == 'true' ]]; then
|
|||||||
INSECURE_OPTION="--insecure"
|
INSECURE_OPTION="--insecure"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
curl -fsSL --retry 5 --keepalive-time 2 ${INSECURE_OPTION} "${DOWNLOAD_URL_PREFIX}/${CLIENT_BINARY}" -o "${TARGET}"
|
if [[ ! -x "${TARGET}" ]]; then
|
||||||
chmod +x "${TARGET}"
|
curl -fsSL --retry 5 --keepalive-time 2 ${INSECURE_OPTION} "${DOWNLOAD_URL_PREFIX}/${CLIENT_BINARY}" -o "${TARGET}"
|
||||||
|
chmod +x "${TARGET}"
|
||||||
|
else
|
||||||
|
echo "Binary ${CLIENT_BINARY} already exists and is executable, skipping download."
|
||||||
|
fi
|
||||||
|
|
||||||
echo "======= CLI Version Information ======="
|
echo "======= CLI Version Information ======="
|
||||||
"${TARGET}" --version
|
"${TARGET}" --version
|
||||||
|
Reference in New Issue
Block a user