name: Pure Run Build on: [push] jobs: build: runs-on: ubuntu-latest steps: - name: 安装基础工具 run: | apt-get update apt-get install -y git golang-go - name: 克隆当前仓库 run: | git clone ${{ gitea.server_url }}/${{ gitea.repository }}.git . git checkout ${{ gitea.sha }} - name: 编译 Go 项目 run: | go mod tidy go build -o myapp . - name: 运行测试 run: | go test ./... - name: 打印完成 run: echo "构建完成 ✅" - name: 运行应用程序 run: | ./myapp