✨ gitea的runner参数化,可以通过docker-compose.yml进行配置
Ubuntu System Information / show-system-info (push) Successful in 39s
Ubuntu System Information / show-system-info (push) Successful in 39s
🐛 修复`Dockerfile`缺少系统包
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user