fix(gitea-runner): fix config.yaml format and registration script
This commit is contained in:
parent
775ad3fcd6
commit
cc88ad5c05
@ -11,15 +11,9 @@ runner:
|
||||
- ubuntu-latest:host
|
||||
|
||||
cache:
|
||||
enabled: true
|
||||
dir: ""
|
||||
backend: local
|
||||
enabled: false
|
||||
|
||||
docker:
|
||||
host: unix:///var/run/docker.sock
|
||||
network: ""
|
||||
privileged: false
|
||||
macos:
|
||||
disabled: true
|
||||
windows:
|
||||
disabled: true
|
||||
|
||||
43
gitea-runner/register.sh
Normal file → Executable file
43
gitea-runner/register.sh
Normal file → Executable file
@ -9,7 +9,7 @@
|
||||
set -e
|
||||
|
||||
GITEA_URL="${INSTANCE_URL:-https://gitea.hackerfortress.cc}"
|
||||
TOKEN="${RUNNER_TOKEN}"
|
||||
TOKEN="eBtqNTibRTIrZxlcqopYJUeJJj1mhaCJxIaEOhcU"
|
||||
|
||||
if [ -z "$TOKEN" ]; then
|
||||
echo "❌ RUNNER_TOKEN not set"
|
||||
@ -19,16 +19,41 @@ fi
|
||||
|
||||
echo "📡 Registering runner with Gitea at ${GITEA_URL}..."
|
||||
|
||||
# Register and get the runner config
|
||||
docker compose run --rm act_runner \
|
||||
act_runner generate-config \
|
||||
# Create initial config for registration
|
||||
cat > config.yaml << EOF
|
||||
log:
|
||||
level: info
|
||||
formatting: text
|
||||
|
||||
runner:
|
||||
capacity: 2
|
||||
name: gitea-runner-hestia
|
||||
labels:
|
||||
- gitea-runner-hestia
|
||||
- ubuntu-latest:docker://ubuntu:latest
|
||||
- ubuntu-latest:host
|
||||
|
||||
cache:
|
||||
enabled: false
|
||||
|
||||
docker:
|
||||
host: unix:///var/run/docker.sock
|
||||
network: ""
|
||||
privileged: false
|
||||
EOF
|
||||
|
||||
# Run registration using the runner itself
|
||||
docker compose run --rm \
|
||||
-e GITEA_INSTANCE_URL="${GITEA_URL}" \
|
||||
-e GITEA_RUNNER_TOKEN="${TOKEN}" \
|
||||
act_runner \
|
||||
act_runner register \
|
||||
--instance "${GITEA_URL}" \
|
||||
--token "${TOKEN}" \
|
||||
--name "gitea-runner-dockerino" \
|
||||
> config.yaml
|
||||
--name "gitea-runner-hestia" \
|
||||
--labels "gitea-runner-hestia"
|
||||
|
||||
echo "✅ Runner registered successfully!"
|
||||
echo ""
|
||||
echo "Next steps:"
|
||||
echo "1. Review config.yaml"
|
||||
echo "2. Run: docker compose up -d"
|
||||
echo "Now start with:"
|
||||
echo " docker compose up -d"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user