Gitea Action runner installer

This commit is contained in:
Clemens Schwaighofer
2024-08-28 11:05:55 +09:00
parent 08715b4437
commit 59f2394b5c
2 changed files with 28 additions and 0 deletions

23
install-act_runner.sh Executable file
View File

@@ -0,0 +1,23 @@
#!/usr/bin/env bash
BASE_FOLDER=$(dirname "$(readlink -f "$0")")"/";
# shellcheck source=init.sh
. "${BASE_FOLDER}init.sh";
if [ -z "${1}" ]; then
echo "Please give a Gitea Action Runner version to upgrade to";
exit;
fi;
if [ ! -f "${download_folder}act_runner-${1}-${arch}" ]; then
echo "Cannot find file: ${download_folder}act_runner-${1}-${arch}";
exit;
fi;
echo -e "Update gitea action runner to ${1} ... ";
systemctl stop act_runner;
cp "${download_folder}act_runner-${1}-${arch}" "${target_file_act_runner}";
chmod +x "${target_file_act_runner}";
systemctl start gitea;
echo "[DONE]";
# __END__