mirror of
https://github.com/hamster1963/nezha-dash.git
synced 2025-04-24 21:10:45 +08:00
perf: remvoe qemu
This commit is contained in:
parent
2c6bf553f7
commit
59363fcf0c
9
.github/workflows/Deploy.yml
vendored
9
.github/workflows/Deploy.yml
vendored
@ -18,11 +18,10 @@ jobs:
|
|||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up QEMU
|
|
||||||
uses: docker/setup-qemu-action@v3
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
with:
|
||||||
|
driver-opts: network=host
|
||||||
|
|
||||||
- name: Login to Docker Hub
|
- name: Login to Docker Hub
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
@ -56,6 +55,10 @@ jobs:
|
|||||||
push: true
|
push: true
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
cache-from: type=registry,ref=${{ env.REGISTRY_IMAGE }}:cache
|
||||||
|
cache-to: type=inline
|
||||||
|
build-args: |
|
||||||
|
BUILDKIT_INLINE_CACHE=1
|
||||||
|
|
||||||
changelog:
|
changelog:
|
||||||
name: Generate Changelog
|
name: Generate Changelog
|
||||||
|
@ -1,20 +1,20 @@
|
|||||||
FROM oven/bun:1 AS base
|
FROM --platform=$BUILDPLATFORM oven/bun:1 as base
|
||||||
|
|
||||||
# Stage 1: Install dependencies
|
# Stage 1: Install dependencies
|
||||||
FROM base AS deps
|
FROM base AS deps
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY package.json bun.lockb ./
|
COPY package.json bun.lockb ./
|
||||||
RUN bun install --frozen-lockfile
|
RUN --mount=type=cache,target=/root/.bun bun install --frozen-lockfile
|
||||||
|
|
||||||
# Stage 2: Build the application
|
# Stage 2: Build the application
|
||||||
FROM base AS builder
|
FROM base AS builder
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=deps /app/node_modules ./node_modules
|
COPY --from=deps /app/node_modules ./node_modules
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN bun run build
|
RUN --mount=type=cache,target=/root/.bun bun run build
|
||||||
|
|
||||||
# Stage 3: Production image
|
# Stage 3: Production image
|
||||||
FROM oven/bun:1-alpine AS runner
|
FROM --platform=$TARGETPLATFORM oven/bun:1-alpine AS runner
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
COPY --from=builder /app/public ./public
|
COPY --from=builder /app/public ./public
|
||||||
|
Loading…
Reference in New Issue
Block a user