Add gitea donwload file version info, missing installs are no longer forced exit
fix restart of act runner after update when downloading gitea or act runner it will show the version that is downlaoded. if the same version is downloaded again and alrady exists, download will be skipped
This commit is contained in:
Regular → Executable
+12
@@ -4,6 +4,18 @@ BASE_FOLDER=$(dirname "$(readlink -f "$0")")"/";
|
||||
# shellcheck source=init.sh
|
||||
. "${BASE_FOLDER}init.sh";
|
||||
|
||||
download_file=$(curl -s https://gitea.com/api/v1/repos/gitea/act_runner/releases/latest |\
|
||||
jq ".assets[].browser_download_url" |\
|
||||
cut -d '"' -f 2 |\
|
||||
grep "${arch}$");
|
||||
version=$(echo "${download_file}" | cut -d "/" -f 8);
|
||||
file=$(echo "${download_file}" | cut -d "/" -f 9);
|
||||
if [ -f "${download_folder}/${file}" ]; then
|
||||
echo "[!] File ${file} has already been downloaded";
|
||||
exit;
|
||||
fi;
|
||||
echo "act_runner version to download: ${version}";
|
||||
|
||||
cd "${download_folder}" || exit;
|
||||
curl -s https://gitea.com/api/v1/repos/gitea/act_runner/releases/latest |\
|
||||
jq ".assets[].browser_download_url" |\
|
||||
|
||||
Reference in New Issue
Block a user