Browse Source

change build base image

Signed-off-by: allan716 <[email protected]>
allan716 4 years ago
parent
commit
ffb5fd9132
3 changed files with 6 additions and 5 deletions
  1. 3 1
      .github/workflows/Build Image-dev.yml
  2. 1 2
      Dockerfile
  3. 2 2
      go.mod

+ 3 - 1
.github/workflows/Build Image-dev.yml

@@ -12,6 +12,8 @@ jobs:
     steps:
       - name: Checkout
         uses: actions/checkout@v2
+        with:
+          ref: dev
       # 获取 tag 版本
       - name: Set Version
         id: set-version
@@ -40,6 +42,6 @@ jobs:
           platforms: linux/amd64,linux/arm/v7,linux/arm64
           push: true
           tags: |
-            ${{ secrets.DOCKER_USERNAME }}/chinesesubfinder:dev${{ steps.set-version.outputs.version }}
+            ${{ secrets.DOCKER_USERNAME }}/chinesesubfinder:${{ steps.set-version.outputs.version }}
 
 

+ 1 - 2
Dockerfile

@@ -1,4 +1,4 @@
-FROM golang:1.15-buster AS builder
+FROM superng6/go:latest AS builder
 
 LABEL stage=gobuilder
 
@@ -9,7 +9,6 @@ ENV GOPROXY https://goproxy.cn,direct
 
 # 切换工作目录
 WORKDIR /homelab/buildspace
-
 COPY . .
 # 执行编译,-o 指定保存位置和程序编译名称
 RUN go build -ldflags="-s -w" -o /app/chinesesubfinder

+ 2 - 2
go.mod

@@ -52,8 +52,8 @@ require (
 	gopkg.in/ini.v1 v1.62.0 // indirect
 	gopkg.in/yaml.v2 v2.4.0 // indirect
 	gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
-	gorm.io/driver/sqlite v1.1.4 // indirect
-	gorm.io/gorm v1.21.12 // indirect
+	gorm.io/driver/sqlite v1.1.4
+	gorm.io/gorm v1.21.12
 )
 
 replace github.com/go-creed/sat => github.com/allanpk716/sat v0.0.0-20210622112535-2e00ce54a80b