mirror of
https://github.com/142vip/408CSFamily.git
synced 2026-02-03 18:43:20 +08:00
Merge pull request #69 from 142vip/fix/ci-cd
fix(CI): 修改release执行条件,next分支触发
This commit is contained in:
3
.github/workflows/CD.yaml
vendored
3
.github/workflows/CD.yaml
vendored
@@ -8,7 +8,6 @@ name: CD
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- next
|
||||
workflow_dispatch:
|
||||
|
||||
@@ -23,6 +22,7 @@ jobs:
|
||||
deploy-github:
|
||||
name: "部署到Github-Pages"
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == '142vip/408CSFamily'
|
||||
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
@@ -68,6 +68,7 @@ jobs:
|
||||
name: "部署到Vercel平台"
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == '142vip/408CSFamily'
|
||||
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
4
.github/workflows/CI.yml
vendored
4
.github/workflows/CI.yml
vendored
@@ -9,7 +9,6 @@ on:
|
||||
- next
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- next
|
||||
# 手动触发部署
|
||||
workflow_dispatch:
|
||||
@@ -69,6 +68,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- install-init
|
||||
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
@@ -104,7 +104,7 @@ jobs:
|
||||
name: "构建Docker镜像"
|
||||
runs-on: ubuntu-latest
|
||||
## 主库且tag更新时执行
|
||||
if: github.repository == '142vip/408CSFamily' && startsWith(github.ref, 'refs/tags/v')
|
||||
if: github.repository == '142vip/408CSFamily' && startsWith(github.event.head_commit.message, 'chore(release):')
|
||||
permissions:
|
||||
actions: read
|
||||
pull-requests: read
|
||||
|
||||
Reference in New Issue
Block a user