File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Update Packages
22
33# 上游 gameframex 包发版(public-github-actions publish-release.yml 末尾 dispatch 触发)
4- # 或每周一兜底 + 手动触发:查 registry 最新版,bump Packages/manifest.json 并直推 main
4+ # 或每天北京时间凌晨 3 点(UTC 19:00)定时 + 手动触发:
5+ # 由公共可重用工作流查 registry 最新版,bump Packages/manifest.json 并直推 main
56on :
67 repository_dispatch :
78 types : [package-released]
89 schedule :
9- - cron : " 0 2 * * 1 "
10+ - cron : " 0 19 * * * "
1011 workflow_dispatch :
1112
12- permissions :
13- contents : write
14-
1513jobs :
16- bump-manifest :
17- runs-on : ubuntu-latest
18- steps :
19- - uses : actions/checkout@v6
20-
21- - uses : actions/setup-node@v6
22- with :
23- node-version : " lts/*"
24-
25- - name : Bump manifest versions
26- id : bump
27- run : |
28- node scripts/update-gameframex-packages.mjs | tee /tmp/changes.txt
29- if grep -q '^NO_CHANGES$' /tmp/changes.txt; then
30- echo "changed=false" >> "$GITHUB_OUTPUT"
31- else
32- echo "changed=true" >> "$GITHUB_OUTPUT"
33- fi
34-
35- - name : Commit and push
36- if : steps.bump.outputs.changed == 'true'
37- run : |
38- git config user.name "github-actions[bot]"
39- git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
40- git add Packages/manifest.json
41- printf 'chore(deps): bump gameframex packages\n\n%s\n' "$(cat /tmp/changes.txt)" | git commit -F -
42- git push
14+ update-packages :
15+ # 引用外部仓库的可重用工作流
16+ # 权限由外部工作流统一配置,无需在调用方声明
17+ uses : GameFrameX/public-github-actions/.github/workflows/update-packages.yml@main
18+ # 组织级别已配置密钥,可以使用 inherit 继承所有密钥
19+ secrets : inherit
Load diff This file was deleted.
You can’t perform that action at this time.
0 commit comments