Vanguard media stack: ingest, copyparty, Syncthing, normalize sweep, Authentik, Jellyfin + Vanguard Metadata plugin, MariaDB, Gitea, bot runtime
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
13
registerGiteaRunner.sh
Executable file
13
registerGiteaRunner.sh
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
# Generate a runner registration token from Gitea, store it in .env, (re)start the runner.
|
||||
# Re-run any time the runner shows as offline/unregistered.
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")"
|
||||
docker ps --format '{{.Names}}' | grep -qx gitea || { echo "gitea container not running"; exit 1; }
|
||||
TOKEN=$(docker exec -u 1000 gitea gitea --config /data/gitea/conf/app.ini actions generate-runner-token | tail -1 | tr -d '\r')
|
||||
[[ ${#TOKEN} -ge 20 ]] || { echo "could not get a token: $TOKEN"; exit 1; }
|
||||
if grep -q '^GITEA_RUNNER_TOKEN=' .env; then sed -i "s|^GITEA_RUNNER_TOKEN=.*|GITEA_RUNNER_TOKEN=$TOKEN|" .env; else echo "GITEA_RUNNER_TOKEN=$TOKEN" >> .env; fi
|
||||
sudo rm -rf /srv/appdata/act_runner/.runner 2>/dev/null || true # forget any previous registration
|
||||
docker compose up -d --force-recreate act_runner
|
||||
sleep 6; docker logs act_runner --tail 8 2>&1 | sed 's/^/ /'
|
||||
echo "check: Gitea -> Site Administration -> Actions -> Runners (should list 'vanguard-runner' as idle)"
|
||||
Reference in New Issue
Block a user