1
0
mirror of https://github.com/142vip/408CSFamily.git synced 2026-04-14 02:09:56 +08:00

fix(GitHub Actions): 修复CI流水线docker构建异常 (#110)

* fix(GitHub Actions): 修复`CI`流水线`docker`构建异常

* chore: update

* chore: update

* chore: update

---------

Co-authored-by: chufan <mmdapl@163.com>
This commit is contained in:
微信公众号:储凡
2024-10-05 12:38:06 +08:00
committed by GitHub
parent cd00b032eb
commit 6d7ae35664
2 changed files with 31 additions and 13 deletions

View File

@@ -27,7 +27,7 @@ jobs:
Base-Build:
name: 基础编译构建
runs-on: ubuntu-latest
# # 主库且拉取PR时触发
# 主库且拉取PR时触发
if: github.repository == '142vip/408CSFamily' && github.event_name == 'pull_request'
permissions:
actions: read
@@ -47,7 +47,7 @@ jobs:
with:
version: 9.6.0
# # 安装Node环境
# 安装Node环境
- name: Install Node.js
uses: actions/setup-node@v3
with:
@@ -55,7 +55,7 @@ jobs:
# # 缓存
cache: pnpm
# # 下载依赖,并执行初始化脚本:钩子函数、思维导图构建
# 下载依赖,并执行初始化脚本:钩子函数、思维导图构建
- name: Install Dependencies
run: |
./scripts/ci
@@ -75,7 +75,7 @@ jobs:
Build-Docker-Image:
name: 构建Docker镜像
runs-on: ubuntu-latest
# # 主库且tag更新时执行
# 主库且tag更新时执行
if: github.repository == '142vip/408CSFamily' && startsWith(github.event.head_commit.message, 'chore(release):')
permissions:
actions: read
@@ -104,16 +104,31 @@ jobs:
--password=${{ secrets.DOCKER_PASSWORD }} \
${{env.REGISTRY}}
# 安装PNPM
- name: PNPM Install
uses: pnpm/action-setup@v4
with:
version: 9.6.0
# 安装Node环境
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 20.16.0
# # 缓存
cache: pnpm
# 下载依赖,并执行初始化脚本:钩子函数、思维导图构建
- name: Install Dependencies
run: |
./scripts/ci
# # 构建支持domain
- name: Build To Dist
run: |
pnpm build
# # 构建支持domain
# - name: Build To Dist
# run: |
# pnpm build
# # 快速构建并推送
# 快速构建并推送
- name: Push Docker Image
run: |
./scripts/bundle