mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-01 22:46:38 +08:00
feat: 删除旧的 Docker 镜像构建工作流,添加新的工作流以支持多架构构建和推送,更新 GitHub Pages 和 Release 工作流文档
This commit is contained in:
+13
-7
@@ -1,22 +1,28 @@
|
||||
FROM node:16 as builder
|
||||
ARG VERSION=dev
|
||||
|
||||
FROM node:18 AS builder
|
||||
|
||||
ARG VERSION
|
||||
|
||||
WORKDIR /build
|
||||
COPY ./web .
|
||||
COPY ./VERSION .
|
||||
COPY ./web/package*.json ./
|
||||
RUN npm install
|
||||
RUN REACT_APP_VERSION=$(cat VERSION) npm run build
|
||||
COPY ./web ./
|
||||
RUN REACT_APP_VERSION="$VERSION" npm run build
|
||||
|
||||
FROM golang AS builder2
|
||||
FROM golang:1.22 AS builder2
|
||||
|
||||
ARG VERSION
|
||||
|
||||
ENV GO111MODULE=on \
|
||||
CGO_ENABLED=1 \
|
||||
CGO_ENABLED=0 \
|
||||
GOOS=linux
|
||||
|
||||
WORKDIR /build
|
||||
COPY . .
|
||||
COPY --from=builder /build/build ./web/build
|
||||
RUN go mod download
|
||||
RUN go build -ldflags "-s -w -X 'atsflare/common.Version=$(cat VERSION)' -extldflags '-static'" -o atsflare
|
||||
RUN go build -trimpath -ldflags "-s -w -X 'atsflare/common.Version=$VERSION'" -o atsflare
|
||||
|
||||
FROM alpine
|
||||
|
||||
|
||||
Reference in New Issue
Block a user