From 95a492bd109e522bbb4637a38c1c8795522bc9e5 Mon Sep 17 00:00:00 2001 From: zhangchao Date: Thu, 31 Oct 2024 19:37:28 +0800 Subject: [PATCH] update --- .gitea/workflows/go.yaml | 20 ++++++++++++++++++++ Dokerfile.yaml | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) 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