Skip to content

Commit

Permalink
ci: 更新 GitHub Actions 工作流权限
Browse files Browse the repository at this point in the history
- 移除了不必要的 workflows 权限
- 添加了 workflow_dispatch 事件触发器
- 优化了工作流配置,提高了安全性
  • Loading branch information
h7ml committed Dec 28, 2024
1 parent 8a7c4f3 commit 2f36860
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
pull_request:
branches:
- main

workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -18,7 +18,6 @@ jobs:
issues: write # 管理 issues
pull-requests: write # 管理 pull requests
actions: write # 修改 Actions 工作流
workflows: write # 修改工作流(.github/workflows)
discussions: write # 写入讨论区
statuses: write # 更新 commit 状态
packages: write # 上传、删除包
Expand Down

0 comments on commit 2f36860

Please sign in to comment.