fix(ci): utiliser une image runner locale compatible

This commit is contained in:
Manus AI
2026-08-18 08:38:17 +00:00
parent 7270e1a89a
commit f692be04d2
2 changed files with 6 additions and 3 deletions

View File

@@ -8,7 +8,8 @@ readonly RUNNER_DIR="/opt/manus-deploy/gitea-runner"
readonly GITEA_CONTAINER="gitea"
readonly GITEA_URL="https://git.recette.santinova-soft.org"
readonly RUNNER_NAME="recette-docker-runner"
readonly RUNNER_LABELS="ubuntu-latest:docker://node:22-bookworm"
readonly RUNNER_LABELS="ubuntu-latest:docker://node:20-alpine"
readonly LABEL_FILE="${RUNNER_DIR}/labels"
install -d -m 0750 "${RUNNER_DIR}"
install -m 0640 "${SCRIPT_DIR}/gitea-act-runner-config.yaml" "${RUNNER_DIR}/config.yaml"
@@ -19,7 +20,9 @@ if [[ ! -f "${RUNNER_DIR}/.runner" && -f "${APP_DIR}/.runner" ]]; then
mv "${APP_DIR}/.runner" "${RUNNER_DIR}/.runner"
fi
if [[ ! -f "${RUNNER_DIR}/.runner" ]]; then
if [[ ! -f "${RUNNER_DIR}/.runner" || ! -f "${LABEL_FILE}" || "$(<"${LABEL_FILE}")" != "${RUNNER_LABELS}" ]]; then
systemctl stop gitea-act-runner.service 2>/dev/null || true
rm -f "${RUNNER_DIR}/.runner"
token="$(docker exec -u git "${GITEA_CONTAINER}" gitea actions generate-runner-token)"
(
cd "${RUNNER_DIR}"
@@ -30,6 +33,7 @@ if [[ ! -f "${RUNNER_DIR}/.runner" ]]; then
--labels "${RUNNER_LABELS}" \
--config "${RUNNER_DIR}/config.yaml"
)
printf '%s\n' "${RUNNER_LABELS}" > "${LABEL_FILE}"
fi
systemctl daemon-reload