From 6e6473e6a9303b11ec828e5f340b79f468e59ab6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=AF=BB=E6=AC=A2?= Date: Wed, 25 Oct 2023 08:51:16 +0800 Subject: [PATCH] =?UTF-8?q?:green=5Fheart:=20=E6=96=B0=E5=A2=9EActions?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=B5=81=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/build-image.yaml | 29 +++++++++++++++++++++++++++++ Dockerfile | 6 +++--- 2 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 .gitea/workflows/build-image.yaml diff --git a/.gitea/workflows/build-image.yaml b/.gitea/workflows/build-image.yaml new file mode 100644 index 0000000..3400d42 --- /dev/null +++ b/.gitea/workflows/build-image.yaml @@ -0,0 +1,29 @@ +name: BuildImage + +on: + push: + branches: + - main +# - '*' +# - '!main' + +jobs: + build-image: + runs-on: ubuntu-latest + steps: + - name: Setup Golang + uses: actions/setup-go@v3 + with: + go-version: '>=1.21.0' + cache: false + + - name: Checkout Code + uses: actions/checkout@v3 + + - name: Build image + uses: docker/build-push-action@v2 + with: + push: true + tags: | + gitee.ltd/lxh/go-wxhelper:latest + gitee.ltd/lxh/go-wxhelper:v${{ github.run_number }} diff --git a/Dockerfile b/Dockerfile index 82dc5fe..60e3246 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,14 +2,14 @@ FROM golang:alpine as builder WORKDIR /builder COPY . . -ENV GO111MODULE=on -ENV GOPROXY=https://goproxy.cn,direct +#ENV GO111MODULE=on +#ENV GOPROXY=https://goproxy.cn,direct RUN go version RUN go mod download && go build -o app RUN ls -lh && chmod +x ./app -FROM repo.lxh.io/alpine:3.16.0 as runner +FROM code.hyxc1.com/open/alpine:3.16.0 as runner LABEL org.opencontainers.image.authors="lxh@cxh.cn" EXPOSE 19099