Ultralytics Actions
Ultralytics 用于代码格式化、链接检查、PR 摘要生成、运行 AI 审查、标记 Issue 以及报告仓库健康状况的 GitHub 工作流。
.github/workflows/ultralytics-actions.yml
name: Ultralytics Actions
on:
issues:
types: [opened]
pull_request:
branches: [main]
types: [opened, closed, synchronize, review_requested]
permissions:
contents: write
pull-requests: write
issues: write
jobs:
actions:
runs-on: ubuntu-latest
steps:
- uses: ultralytics/actions@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
labels: true
python: true
prettier: true
spelling: true
links: true
summary: true
openai_api_key: ${{ secrets.OPENAI_API_KEY }}在 GitHub 内部运行的仓库自动化工具
通过一个 GitHub 工作流运行维护人员最需要的检查、摘要、审查、标签和报告功能。
代码格式化与检查
在一个组合动作中运行 Ruff、Biome、Prettier、codespell、Lychee、swift-format 和 Dart 格式化工具。
PR 摘要与审查
生成 PR 摘要和 AI 代码审查,帮助维护人员专注于代码行为、风险和后续工作。
标注新工作
为 Issue、PR 和讨论添加相关标签,使仓库队列保持井然有序。
重试不稳定命令
为不稳定的 CI 步骤添加重试、退避和超时机制,无需重复编写 shell 逻辑。
报告仓库健康状况
汇总跨组织仓库中所有待处理的 PR 以及失败的默认分支工作流。
使用 Python 包
安装 ultralytics-actions,以便以编程方式访问与这些 Actions 相同的维护工具。
常见问题解答
Ultralytics Actions 是官方的 GitHub 自动化套件,用于代码格式化、链接检查、拼写检查、PR 摘要、AI 审查、Issue 标记、仓库报告和依赖项维护。
它在 GitHub Actions 工作流中运行。只需从 Marketplace 列表 添加
uses: ultralytics/actions@main,选择你需要的输入参数,并提供必需的 GitHub token 和可选的 AI 提供商密钥即可。
在 PR 合并后构建模型
使用 Ultralytics Actions 保持仓库进度,然后将数据集、训练和部署工作转移到 Ultralytics Platform。