Update gitea download and switch to xz files

XZ files are downloaded
Change that any grep is replaced by jq command, and sed for " replace

Add systemd service files as samples
This commit is contained in:
Clemens Schwaighofer
2026-04-23 14:11:31 +09:00
parent 26cbfbe39f
commit a58e0d8de5
8 changed files with 75 additions and 11 deletions
+3 -3
View File
@@ -6,8 +6,8 @@ BASE_FOLDER=$(dirname "$(readlink -f "$0")")"/";
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}$");
sed -e 's/"//g' |\
grep "${arch}.xz$");
version=$(echo "${download_file}" | cut -d "/" -f 8);
file=$(echo "${download_file}" | cut -d "/" -f 9);
if [ -f "${download_folder}/${file}" ]; then
@@ -19,7 +19,7 @@ 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" |\
cut -d '"' -f 2 |\
sed -e 's/"//g' |\
grep "${arch}$" |\
xargs curl -LJO --output-dir "${download_folder}"
cd - || exit;