justincnn commited on
Commit
e03f5eb
·
1 Parent(s): 06edf9e

fix: update GitHub Actions to v6 and Go to 1.23

Browse files

- Update docker/build-push-action from v5 to v6 to fix Node.js 20 deprecation warning
- Update Go version from 1.21 to 1.23 in Dockerfile
- Add go mod verify after go mod download for better error handling

Files changed (2) hide show
  1. .github/workflows/docker-build.yml +1 -1
  2. Dockerfile +2 -2
.github/workflows/docker-build.yml CHANGED
@@ -49,7 +49,7 @@ jobs:
49
  type=raw,value=latest,enable={{is_default_branch}}
50
 
51
  - name: Build and push
52
- uses: docker/build-push-action@v5
53
  with:
54
  context: .
55
  platforms: linux/amd64,linux/arm64
 
49
  type=raw,value=latest,enable={{is_default_branch}}
50
 
51
  - name: Build and push
52
+ uses: docker/build-push-action@v6
53
  with:
54
  context: .
55
  platforms: linux/amd64,linux/arm64
Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- FROM golang:1.21-alpine AS builder
2
 
3
  WORKDIR /app
4
 
@@ -6,7 +6,7 @@ WORKDIR /app
6
  ENV GOPROXY=https://goproxy.cn,direct
7
 
8
  COPY go.mod go.sum ./
9
- RUN go mod download
10
 
11
  COPY . .
12
  RUN CGO_ENABLED=0 GOOS=linux go build -o zai-proxy .
 
1
+ FROM golang:1.23-alpine AS builder
2
 
3
  WORKDIR /app
4
 
 
6
  ENV GOPROXY=https://goproxy.cn,direct
7
 
8
  COPY go.mod go.sum ./
9
+ RUN go mod download && go mod verify
10
 
11
  COPY . .
12
  RUN CGO_ENABLED=0 GOOS=linux go build -o zai-proxy .