fix(ci): utiliser une image runner locale compatible
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user