ci: 显式授予 Action 写入权限以突破 403 封锁

This commit is contained in:
root
2026-07-07 02:29:21 -04:00
parent c8ce305eaa
commit 2a52728834

View File

@@ -5,6 +5,10 @@ on:
- cron: '0 0 * * *' # 每天 UTC 零点自动触发执行
workflow_dispatch: # 允许您在 GitHub 网页上手动点击运行
# 👇 [核心修复] 显式向 GitHub 申请对代码库的写入权限
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
@@ -30,4 +34,4 @@ jobs:
git config --local user.name "github-actions[bot]"
git add data/star_history.svg
git commit -m "chore: 自动化更新 Star 趋势图 (Native Curl 双擎版)" || exit 0
git push origin main
git push origin main