diff --git a/.gitea/workflows/go.yaml b/.gitea/workflows/go.yaml index 28f7cb1..3d230d3 100644 --- a/.gitea/workflows/go.yaml +++ b/.gitea/workflows/go.yaml @@ -4,7 +4,27 @@ on: branches: [ master ] jobs: + build: + name: Build and test + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: 1.21 + + - name: Build project + run: | + go build -v ./... + - name: Test with the Go CLI + run: go test + docker: + needs: build runs-on: ubuntu-latest steps: diff --git a/Dokerfile.yaml b/Dokerfile.yaml index 255f378..8e6d25a 100644 --- a/Dokerfile.yaml +++ b/Dokerfile.yaml @@ -1,5 +1,5 @@ # 使用官方的 Go 运行时作为基础镜像 -FROM golang:1.18-alpine AS builder +FROM golang:latest AS builder # 设置工作目录 WORKDIR /app