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:
parent
868bfbc365
commit
84c36c464d
1 changed files with 4 additions and 3 deletions
|
|
@ -10,11 +10,12 @@ CONFIG=/data/.runner
|
||||||
|
|
||||||
if [ ! -f "$CONFIG" ]; then
|
if [ ! -f "$CONFIG" ]; then
|
||||||
echo "[runner] No registration found — registering with Forgejo…"
|
echo "[runner] No registration found — registering with Forgejo…"
|
||||||
forgejo-runner create-runner-file \
|
forgejo-runner register \
|
||||||
--instance "${FORGEJO_INSTANCE_URL}" \
|
--instance "${FORGEJO_INSTANCE_URL}" \
|
||||||
--secret "${FORGEJO_RUNNER_TOKEN}" \
|
--token "${FORGEJO_RUNNER_TOKEN}" \
|
||||||
--name "${FORGEJO_RUNNER_NAME:-hiy-runner}" \
|
--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."
|
echo "[runner] Registration complete."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue