docker push不上去,尝试加入github action在服务器构建

This commit is contained in:
irving
2025-10-03 23:25:48 -04:00
parent 29da6b906b
commit 043483a076
4 changed files with 118 additions and 4 deletions

View File

@@ -21,8 +21,9 @@ elif [[ "$NATIVE_ARCH" == "arm64" ]] || [[ "$NATIVE_ARCH" == "aarch64" ]]; then
NATIVE_ARCH="arm64"
fi
# 处理命令行参数
if [[ "$1" == "-h" || "$1" == "--help" ]]; then
# 处理命令行参数(兼容未提供参数时的 set -u
ARG1="${1-}"
if [[ "$ARG1" == "-h" || "$ARG1" == "--help" ]]; then
echo -e "${GREEN}PeiPei 后端 Docker 镜像构建脚本${NC}"
echo ""
echo -e "${YELLOW}用法:${NC}"
@@ -51,7 +52,7 @@ if [[ "$1" == "-h" || "$1" == "--help" ]]; then
exit 0
fi
TARGET_ARCH="${1:-$NATIVE_ARCH}"
TARGET_ARCH="${ARG1:-$NATIVE_ARCH}"
# 验证架构参数
if [[ "$TARGET_ARCH" != "amd64" && "$TARGET_ARCH" != "arm64" ]]; then