'Generic Commit'
This commit is contained in:
parent
8cc1db5769
commit
fcee3fd99d
@ -14,7 +14,6 @@ chmod +x "${TEMP_DIR}/act_runner" || _die "Failed to download ${TEMP_DIR}/act_ru
|
||||
ACT_RUNNER="${GITEA_RUNNER_DIRECTORY}/act_runner"
|
||||
CONFIG_FILE="${GITEA_RUNNER_DIRECTORY}/config.yaml"
|
||||
|
||||
|
||||
echo "Checking version..."
|
||||
mkdir -p "${GITEA_RUNNER_DIRECTORY}" || _die "Failed to create ${GITEA_RUNNER_DIRECTORY}"
|
||||
cp "${TEMP_DIR}/act_runner" "$ACT_RUNNER" || _die "Failed to copy ${TEMP_DIR}/act_runner to ${GITEA_RUNNER_DIRECTORY}/act_runner"
|
||||
@ -25,6 +24,9 @@ if [ ! -f "${CONFIG_FILE}" ]; then
|
||||
echo "Generating config.yaml..."
|
||||
${ACT_RUNNER} generate-config > "${CONFIG_FILE}" || _die "Failed to generate config.yaml"
|
||||
|
||||
# replace the " file: .runner" line with " file: ${GITEA_RUNNER_DIRECTORY}/registration" in config.yaml
|
||||
sed -i "s|[[:space:]]*file:[[:space:]]*\.runner| file: ${GITEA_RUNNER_DIRECTORY}/registration|" "${CONFIG_FILE}"
|
||||
|
||||
echo "Registering runner..."
|
||||
${ACT_RUNNER} --config "${CONFIG_FILE}" \
|
||||
register --no-interactive \
|
||||
@ -36,6 +38,12 @@ else
|
||||
echo "Runner already registered."
|
||||
fi
|
||||
|
||||
[ -f "${CONFIG_FILE}" ] || _die "Failed to create ${CONFIG_FILE}"
|
||||
[ -f "${ACT_RUNNER}" ] || _die "Failed to create ${ACT_RUNNER}"
|
||||
|
||||
echo "CONFIG_FILE: ${CONFIG_FILE}"
|
||||
echo "ACT_RUNNER: ${ACT_RUNNER}"
|
||||
|
||||
./start.sh || _die "Failed to start"
|
||||
|
||||
echo "Installation complete for service ${SERVICE}."
|
||||
|
@ -9,8 +9,8 @@ _check_required_env_vars "SERVER" "SERVICE" "GITEA_RUNNER_DIRECTORY"
|
||||
# It is used to start the service on the server.
|
||||
# It is called with the path to the server specific env file as an argument.
|
||||
|
||||
CONFIG_FILE="${GITEA_RUNNER_DIRECTORY}/config.yaml"
|
||||
ACT_RUNNER="${GITEA_RUNNER_DIRECTORY}/act_runner"
|
||||
CONFIG_FILE="${GITEA_RUNNER_DIRECTORY}/config.yaml"
|
||||
|
||||
echo "Starting act_runner..."
|
||||
"${ACT_RUNNER}" daemon --config "${CONFIG_FILE}" >/dev/null 2>&1 &
|
||||
|
Loading…
x
Reference in New Issue
Block a user