diff --git a/.github/workflows/star_history.yml b/.github/workflows/star_history.yml index bf9796dc..fb2714c9 100644 --- a/.github/workflows/star_history.yml +++ b/.github/workflows/star_history.yml @@ -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 \ No newline at end of file