From 52b9439a141b32128742066e5c86657bfff9321e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=90=E5=A2=A8?= Date: Wed, 11 Feb 2026 10:09:40 +0800 Subject: [PATCH] =?UTF-8?q?build:=20=E5=8D=87=E7=BA=A7=20Node.js=20?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E8=87=B3=2018=20=E5=B9=B6=E5=90=AF=E7=94=A8?= =?UTF-8?q?=20corepack?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将 Docker 基础镜像从 node:16 升级至 node:18。 - 在 Dockerfile 中启用 corepack 并准备指定版本的 yarn。 - 更新所有 GitHub Actions 工作流中的 node-version 为 18。 --- .github/workflows/linux-release.yml | 2 +- .github/workflows/macos-release.yml | 2 +- .github/workflows/windows-release.yml | 2 +- Dockerfile | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/linux-release.yml b/.github/workflows/linux-release.yml index 570f32d..d1fa3c4 100644 --- a/.github/workflows/linux-release.yml +++ b/.github/workflows/linux-release.yml @@ -16,7 +16,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 18 - name: Build Frontend env: CI: "" diff --git a/.github/workflows/macos-release.yml b/.github/workflows/macos-release.yml index 4b47d64..243c14b 100644 --- a/.github/workflows/macos-release.yml +++ b/.github/workflows/macos-release.yml @@ -16,7 +16,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 18 - name: Build Frontend env: CI: "" diff --git a/.github/workflows/windows-release.yml b/.github/workflows/windows-release.yml index b62435c..bec59fb 100644 --- a/.github/workflows/windows-release.yml +++ b/.github/workflows/windows-release.yml @@ -19,7 +19,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 18 - name: Build Frontend env: CI: "" diff --git a/Dockerfile b/Dockerfile index 38e9701..bc5f2aa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,9 @@ -FROM node:16 as builder +FROM node:18 AS builder WORKDIR /build COPY ./web . COPY ./VERSION . +RUN corepack enable && corepack prepare yarn@1.22.22 --activate RUN yarn install RUN REACT_APP_VERSION=$(cat VERSION) yarn build