ci: 添加 Gitea Actions 示例工作流

- 新增 ci.yaml 文件,定义 Gitea Actions 示例
This commit is contained in:
hu xiaotong
2025-06-26 13:27:46 +08:00
parent 084020668d
commit 62e8a6a89e

View File

@@ -89,9 +89,37 @@ jobs:
run: |
echo "📦 下载Go模块依赖..."
export PATH=$PATH:/usr/local/go/bin
# 显示当前目录和文件
echo "当前工作目录: $(pwd)"
echo "目录内容:"
ls -la
# 检查go.mod文件
if [ -f "go.mod" ]; then
echo "✅ 找到go.mod文件"
cat go.mod | head -5
else
echo "❌ 未找到go.mod文件"
exit 1
fi
# 设置Go模块环境
export GO111MODULE=on
export GOPROXY=https://goproxy.cn,direct
echo "Go环境变量:"
echo "GOPROXY: $GOPROXY"
echo "GO111MODULE: $GO111MODULE"
# 下载依赖
go mod download
echo "✅ 依赖下载完成"
# 显示下载的模块
echo "已下载的模块:"
go list -m all | head -10
- name: 验证依赖
run: |
echo "🔍 验证Go模块..."