gitearunner参数化,可以通过docker-compose.yml进行配置
Ubuntu System Information / show-system-info (push) Successful in 39s

🐛 修复`Dockerfile`缺少系统包
This commit is contained in:
csh
2025-12-10 14:42:20 +08:00
parent 1b5611cf3e
commit db75d0ebc5
6 changed files with 48 additions and 10 deletions
+14 -4
View File
@@ -20,12 +20,17 @@ echo ""
# 获取注册信息并验证
while true; do
read -p "Enter Gitea instance URL (e.g., https://gitea.example.com): " GITEA_INSTANCE
if [ -n "${GITEA_INSTANCE:-}" ]; then
echo "Using Gitea instance from env: $GITEA_INSTANCE"
else
read -p "Enter Gitea instance URL (e.g., https://gitea.example.com): " GITEA_INSTANCE
fi
# 验证 URL 格式
if [[ ! "$GITEA_INSTANCE" =~ ^https?:// ]]; then
echo "✗ Error: URL must start with http:// or https://"
echo ""
unset GITEA_INSTANCE
continue
fi
@@ -35,15 +40,20 @@ while true; do
break
done
read -p "Enter registration token: " GITEA_TOKEN
if [ -n "${GITEA_TOKEN:-}" ]; then
echo "Using registration token from env."
else
read -p "Enter registration token: " GITEA_TOKEN
fi
if [ -z "$GITEA_TOKEN" ]; then
echo "✗ Error: Token cannot be empty!"
exit 1
fi
read -p "Enter runner name (default: docker-runner): " RUNNER_NAME
RUNNER_NAME=${RUNNER_NAME:-docker-runner}
DEFAULT_NAME="${DEFAULT_RUNNER_NAME:-docker-runner}"
read -p "Enter runner name (default: $DEFAULT_NAME): " RUNNER_NAME
RUNNER_NAME=${RUNNER_NAME:-$DEFAULT_NAME}
# 多个 label(逗号分隔,无空格)
# ubuntu-22.04:host://ubuntu:22.04,ubuntu-20.04:host://ubuntu:20.04,node:docker://node:18