mirror of
https://github.com/142vip/408CSFamily.git
synced 2026-07-09 08:36:10 +08:00
fix(CI): 修复流水线构建镜像异常 (#68)
This commit is contained in:
6
.github/workflows/CD.yaml
vendored
6
.github/workflows/CD.yaml
vendored
@@ -22,7 +22,7 @@ jobs:
|
||||
## 部署到Github-Pages
|
||||
deploy-github:
|
||||
name: "部署到Github-Pages"
|
||||
runs-on: macos-latest
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
@@ -66,7 +66,7 @@ jobs:
|
||||
## 部署到vercel平台
|
||||
deploy-vercel:
|
||||
name: "部署到Vercel平台"
|
||||
runs-on: macos-latest
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == '142vip/408CSFamily'
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
@@ -91,7 +91,7 @@ jobs:
|
||||
## 版本发布
|
||||
release:
|
||||
name: "Github版本发布"
|
||||
runs-on: macos-latest
|
||||
runs-on: ubuntu-latest
|
||||
## 主库master、next且执行release更新时执行
|
||||
if: github.repository == '142vip/408CSFamily' && startsWith(github.event.head_commit.message, 'chore(release):')
|
||||
|
||||
|
||||
36
.github/workflows/CI.yml
vendored
36
.github/workflows/CI.yml
vendored
@@ -17,10 +17,17 @@ on:
|
||||
schedule:
|
||||
- cron: "0 0 1 * *"
|
||||
|
||||
# 环境变量
|
||||
env:
|
||||
# 阿里云仓库信息
|
||||
REGISTRY: registry.cn-hangzhou.aliyuncs.com
|
||||
UserName: 142vip
|
||||
|
||||
|
||||
jobs:
|
||||
install-init:
|
||||
name: "依赖安装初始化"
|
||||
runs-on: macos-latest
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
pull-requests: read
|
||||
@@ -59,7 +66,7 @@ jobs:
|
||||
|
||||
Base-Build:
|
||||
name: "基础编译构建"
|
||||
runs-on: macos-latest
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- install-init
|
||||
steps:
|
||||
@@ -95,9 +102,7 @@ jobs:
|
||||
|
||||
Build-Docker-Image:
|
||||
name: "构建Docker镜像"
|
||||
runs-on: macos-latest
|
||||
needs:
|
||||
- install-init
|
||||
runs-on: ubuntu-latest
|
||||
## 主库且tag更新时执行
|
||||
if: github.repository == '142vip/408CSFamily' && startsWith(github.ref, 'refs/tags/v')
|
||||
permissions:
|
||||
@@ -112,6 +117,12 @@ jobs:
|
||||
# “最近更新时间” 等 git 日志相关信息,需要拉取全部提交记录
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login Docker
|
||||
run: |
|
||||
docker version
|
||||
@@ -121,23 +132,18 @@ jobs:
|
||||
--password=${{ secrets.DOCKER_PASSWORD }} \
|
||||
${{env.REGISTRY}}
|
||||
|
||||
- name: Restore Dependencies From Cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
|
||||
## 支持思维导图转化
|
||||
- name: Build Mark-Map
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
./scripts/mark-map
|
||||
./scripts/ci
|
||||
|
||||
## 构建,支持domain
|
||||
- name: Build To Dist
|
||||
run: |
|
||||
./scripts/bundle build_proxy
|
||||
./scripts/bundle build
|
||||
|
||||
## 快速构建并推送
|
||||
- name: Push Docker Image
|
||||
run: |
|
||||
./scripts/bundle image_faster
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user