ci: 完善 GitHub Actions 工作流
- 在 build.yml 中添加触发发布工作流步骤 - 更新 sync-upstream.yml 中的步骤名称为中文 - 优化工作流中的任务描述,提高可读性
This commit is contained in:
parent
40e61ff203
commit
58ffabd619
|
|
@ -53,3 +53,10 @@ jobs:
|
||||||
asset_path: ./artifacts/cloudflared-${{ matrix.target_arch }}
|
asset_path: ./artifacts/cloudflared-${{ matrix.target_arch }}
|
||||||
asset_name: cloudflared-${{ matrix.target_arch }}
|
asset_name: cloudflared-${{ matrix.target_arch }}
|
||||||
asset_content_type: application/octet-stream
|
asset_content_type: application/octet-stream
|
||||||
|
|
||||||
|
- name: Trigger Release Workflow
|
||||||
|
if: success()
|
||||||
|
uses: benc-uk/workflow-dispatch@v1
|
||||||
|
with:
|
||||||
|
workflow: create-release.yml # 你的发布工作流文件名
|
||||||
|
token: ${{ secrets.TOKEN }}
|
||||||
|
|
|
||||||
|
|
@ -9,31 +9,31 @@ jobs:
|
||||||
sync-and-build:
|
sync-and-build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Fork 代码
|
- name: Checkout Fork Code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0 # 获取完整 Git 历史
|
fetch-depth: 0 # 获取完整 Git 历史
|
||||||
|
|
||||||
- name: 添加上游仓库 Remote
|
- name: Add Upstream Remote
|
||||||
run: |
|
run: |
|
||||||
git remote add upstream https://github.com/cloudflare/cloudflared.git
|
git remote add upstream https://github.com/cloudflare/cloudflared.git
|
||||||
|
|
||||||
- name: 获取上游最新代码
|
- name: Fetch Upstream Latest Code
|
||||||
run: |
|
run: |
|
||||||
git fetch upstream
|
git fetch upstream
|
||||||
|
|
||||||
- name: 合并上游代码到本地分支
|
- name: Merge Upstream Code to Local Branch
|
||||||
run: |
|
run: |
|
||||||
git merge upstream/master --no-edit # 假设上游主分支是 master
|
git merge upstream/master --no-edit # 假设上游主分支是 master
|
||||||
# 如果有冲突,这里会失败(需手动处理)
|
# 如果有冲突,这里会失败(需手动处理)
|
||||||
|
|
||||||
- name: 推送更新到 Fork 仓库
|
- name: Push Updates to Fork Repository
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
git push origin master
|
git push origin master
|
||||||
|
|
||||||
- name: 触发编译工作流
|
- name: Trigger Build Workflow
|
||||||
uses: benc-uk/workflow-dispatch@v1
|
uses: benc-uk/workflow-dispatch@v1
|
||||||
with:
|
with:
|
||||||
workflow: build.yml # 你的编译工作流文件名
|
workflow: build.yml # 你的编译工作流文件名
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue