From 58ffabd619506e1cb626110e2cee19f9e08afa35 Mon Sep 17 00:00:00 2001 From: tidex <46107860+tidexe@users.noreply.github.com> Date: Sun, 16 Feb 2025 15:14:44 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20=E5=AE=8C=E5=96=84=20GitHub=20Actions=20?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 build.yml 中添加触发发布工作流步骤 - 更新 sync-upstream.yml 中的步骤名称为中文 - 优化工作流中的任务描述,提高可读性 --- .github/workflows/build.yml | 7 +++++++ .github/workflows/sync-upstream.yml | 12 ++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0de981ff..a6bb3927 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -53,3 +53,10 @@ jobs: asset_path: ./artifacts/cloudflared-${{ matrix.target_arch }} asset_name: cloudflared-${{ matrix.target_arch }} 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 }} diff --git a/.github/workflows/sync-upstream.yml b/.github/workflows/sync-upstream.yml index 68476fa0..09d318e0 100644 --- a/.github/workflows/sync-upstream.yml +++ b/.github/workflows/sync-upstream.yml @@ -9,31 +9,31 @@ jobs: sync-and-build: runs-on: ubuntu-latest steps: - - name: Checkout Fork 代码 + - name: Checkout Fork Code uses: actions/checkout@v4 with: fetch-depth: 0 # 获取完整 Git 历史 - - name: 添加上游仓库 Remote + - name: Add Upstream Remote run: | git remote add upstream https://github.com/cloudflare/cloudflared.git - - name: 获取上游最新代码 + - name: Fetch Upstream Latest Code run: | git fetch upstream - - name: 合并上游代码到本地分支 + - name: Merge Upstream Code to Local Branch run: | git merge upstream/master --no-edit # 假设上游主分支是 master # 如果有冲突,这里会失败(需手动处理) - - name: 推送更新到 Fork 仓库 + - name: Push Updates to Fork Repository env: GITHUB_TOKEN: ${{ secrets.TOKEN }} run: | git push origin master - - name: 触发编译工作流 + - name: Trigger Build Workflow uses: benc-uk/workflow-dispatch@v1 with: workflow: build.yml # 你的编译工作流文件名