update
This commit is contained in:
@@ -4,7 +4,27 @@ on:
|
|||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
|
|
||||||
jobs:
|
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:
|
docker:
|
||||||
|
needs: build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# 使用官方的 Go 运行时作为基础镜像
|
# 使用官方的 Go 运行时作为基础镜像
|
||||||
FROM golang:1.18-alpine AS builder
|
FROM golang:latest AS builder
|
||||||
|
|
||||||
# 设置工作目录
|
# 设置工作目录
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|||||||
Reference in New Issue
Block a user