Skip to content

Commit 9abc2a8

Browse files
committed
fix(ci): release 后显式 dispatch 同步工作流(GITHUB_TOKEN 不触发 release 事件)
1 parent 6e84326 commit 9abc2a8

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88

99
permissions:
1010
contents: write
11+
actions: write
1112

1213
jobs:
1314
release:
@@ -73,6 +74,14 @@ jobs:
7374
[精简包](${{ github.server_url }}/${{ github.repository }}/releases/download/${{ github.ref_name }}/${{ steps.pack.outputs.lite_name }})
7475
[纯脚本包](${{ github.server_url }}/${{ github.repository }}/releases/download/${{ github.ref_name }}/${{ steps.pack.outputs.mini_name }})
7576
77+
- name: 触发同步到 KernelSU 仓库
78+
if: github.ref_type == 'tag'
79+
env:
80+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
81+
# release:published 由 GITHUB_TOKEN 创建,受防递归限制不会自动触发 sync 工作流;
82+
# 故在此显式 dispatch(workflow_dispatch 是该限制的官方例外,GITHUB_TOKEN 可触发)。
83+
run: gh workflow run sync-kernelsu.yml
84+
7685
- name: 失败通知
7786
if: failure()
7887
uses: cbrgm/telegram-github-action@v1

0 commit comments

Comments
 (0)