diff --git a/.github/workflows/build_frontend.yml b/.github/workflows/build_frontend.yml index eac227b..716184e 100644 --- a/.github/workflows/build_frontend.yml +++ b/.github/workflows/build_frontend.yml @@ -23,7 +23,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v4 with: - node-version: "20" + node-version: "24.22.1" cache: 'pnpm' cache-dependency-path: frontend/pnpm-lock.yaml diff --git a/.github/workflows/build_image.yml b/.github/workflows/build_image.yml index 1d1bdb1..69ae809 100644 --- a/.github/workflows/build_image.yml +++ b/.github/workflows/build_image.yml @@ -29,7 +29,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: "1.26" + go-version-file: "go.mod" check-latest: true # download Go modules diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 16edd5e..8660cd5 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -29,6 +29,11 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 + - name: Set up Go + if: matrix.language == 'go' + uses: actions/setup-go@v5 + with: + go-version-file: "go.mod" - name: Initialize CodeQL uses: github/codeql-action/init@v3 with: diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml index 69b3665..576a896 100644 --- a/.github/workflows/copilot-setup-steps.yml +++ b/.github/workflows/copilot-setup-steps.yml @@ -28,7 +28,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v4 with: - node-version: "20" + node-version: "24.22.1" cache: "pnpm" cache-dependency-path: frontend/pnpm-lock.yaml @@ -39,7 +39,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: "1.24" + go-version-file: "go.mod" - name: Install dependencies run: | diff --git a/.github/workflows/eslint.yml b/.github/workflows/eslint.yml index 9f959cb..c265e27 100644 --- a/.github/workflows/eslint.yml +++ b/.github/workflows/eslint.yml @@ -22,7 +22,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v4 with: - node-version: "20" + node-version: "24.22.1" cache: 'pnpm' cache-dependency-path: frontend/pnpm-lock.yaml diff --git a/README.md b/README.md index f16658b..03a5fcf 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ 🚀 Linux Do 社区 CDK (Content Distribution Kit) 快速分享平台 [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) -[![Go Version](https://img.shields.io/badge/Go-1.24-blue.svg)](https://golang.org/) +[![Go Version](https://img.shields.io/badge/Go-1.26.10-blue.svg)](https://golang.org/) [![Next.js](https://img.shields.io/badge/Next.js-15-black.svg)](https://nextjs.org/) [![React](https://img.shields.io/badge/React-19-blue.svg)](https://reactjs.org/) @@ -50,7 +50,7 @@ LINUX DO CDK 是一个为 Linux Do 社区打造的内容分发工具平台,旨 ## 🛠️ 技术栈 ### 后端 -- **[Go 1.24](https://go.dev/doc)** - 主要开发语言 +- **[Go 1.26.10](https://go.dev/doc)** - 主要开发语言 - **[Gin](https://github.com/gin-gonic/gin)** - Web 框架 - **[GORM](https://github.com/go-gorm/gorm)** - ORM 框架 - **[Redis](https://github.com/redis/redis)** - 缓存和会话存储 @@ -68,8 +68,8 @@ LINUX DO CDK 是一个为 Linux Do 社区打造的内容分发工具平台,旨 ## 📋 环境要求 -- **Go** >= 1.24 -- **Node.js** >= 18.0 +- **Go** 1.26.10 +- **Node.js** 24.22.1 - **MySQL** >= 8.0 - **Redis** >= 6.0 - **pnpm** >= 8.0 (推荐) diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 5db7b68..7f2ba7f 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -1,5 +1,5 @@ # ---- base stage ---- -FROM node:22-alpine AS base +FROM node:24.22.1-alpine AS base ENV PNPM_HOME="/pnpm" ENV PATH="$PNPM_HOME:$PATH" diff --git a/frontend/README.md b/frontend/README.md index 47c190e..ecd5062 100644 --- a/frontend/README.md +++ b/frontend/README.md @@ -43,7 +43,7 @@ ### 环境要求 -- **Node.js** >= 18.0 +- **Node.js** 24.22.1 - **pnpm** >= 8.0 (推荐) 或 **npm** >= 9.0 ### 安装与启动 diff --git a/frontend/package.json b/frontend/package.json index 3001bba..19ba3ea 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -3,6 +3,9 @@ "version": "1.2.3", "buildDate": "2026-04-22 16:00:00", "private": true, + "engines": { + "node": ">=24.22.1 <25" + }, "scripts": { "dev": "next dev --turbopack", "build": "next build", diff --git a/go.mod b/go.mod index 0c7be3e..88326b4 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/linux-do/cdk -go 1.26.9 +go 1.26.10 require ( github.com/ClickHouse/clickhouse-go/v2 v2.23.2 diff --git a/mise.toml b/mise.toml index 20a7612..a0a8f62 100644 --- a/mise.toml +++ b/mise.toml @@ -1,3 +1,3 @@ [tools] -go = "1.26.9" -node = "24" +go = "1.26.10" +node = "24.22.1"