fix: use forgejo-runner register --token instead of create-runner-file --secret

The UI registration token is not a hex string — create-runner-file --secret
expects a hex secret. Use the register subcommand with --token instead,
which accepts the token from the Forgejo UI directly.

https://claude.ai/code/session_01FKCW3FDjNFj6jve4niMFXH
This commit is contained in:
Claude 2026-03-27 15:28:51 +00:00
parent 868bfbc365
commit 84c36c464d
No known key found for this signature in database

View file

@ -10,11 +10,12 @@ CONFIG=/data/.runner
if [ ! -f "$CONFIG" ]; then
echo "[runner] No registration found — registering with Forgejo…"
forgejo-runner create-runner-file \
forgejo-runner register \
--instance "${FORGEJO_INSTANCE_URL}" \
--secret "${FORGEJO_RUNNER_TOKEN}" \
--token "${FORGEJO_RUNNER_TOKEN}" \
--name "${FORGEJO_RUNNER_NAME:-hiy-runner}" \
--connect
--labels "ubuntu-latest:docker://node:20-bookworm,ubuntu-22.04:docker://node:20-bookworm" \
--no-interactive
echo "[runner] Registration complete."
fi