fix(ci): conserver l enregistrement du runner Gitea

This commit is contained in:
Manus AI
2026-08-18 08:32:17 +00:00
parent b006caa3df
commit 7defcabdc3
2 changed files with 10 additions and 6 deletions

View File

@@ -15,12 +15,15 @@ install -D -m 0644 "${SCRIPT_DIR}/gitea-act-runner.service" /etc/systemd/system/
if [[ ! -f "${RUNNER_DIR}/.runner" ]]; then
token="$(docker exec -u git "${GITEA_CONTAINER}" gitea actions generate-runner-token)"
/usr/local/bin/act_runner register --no-interactive \
--instance "${GITEA_URL}" \
--token "${token}" \
--name "${RUNNER_NAME}" \
--labels "${RUNNER_LABELS}" \
--config "${RUNNER_DIR}/config.yaml"
(
cd "${RUNNER_DIR}"
/usr/local/bin/act_runner register --no-interactive \
--instance "${GITEA_URL}" \
--token "${token}" \
--name "${RUNNER_NAME}" \
--labels "${RUNNER_LABELS}" \
--config "${RUNNER_DIR}/config.yaml"
)
fi
systemctl daemon-reload