Follow-up to https://gitea.com/gitea/runner/pulls/1407, which removes the runner's builtin actions. Drops `builtin:checkout` from the develop runner docs and the current comparison page, and lists the removal under the 6.0 breaking changes. Versioned docs keep it, as released runners still ship it, with their `builtin-actions.md` links pinned to the latest 4.x and 5.x tags since the file leaves runner main. Co-authored-by: Lunny Xiao <[email protected]> Reviewed-on: https://gitea.com/gitea/docs/pulls/643 Reviewed-by: Lunny Xiao <[email protected]> Co-authored-by: silverwind <[email protected]>
3.6 KiB
date, slug, sidebar_position
| date | slug | sidebar_position |
|---|---|---|
| 2023-05-24T15:00:00+08:00 | comparison | 15 |
与GitHub Actions的对比
Gitea Actions旨在与GitHub Actions兼容,差异如下。
额外功能
Action URL绝对路径
uses:支持指向任意Git托管平台的绝对URL,例如uses: https://gitea.com/actions/checkout@v4。
Action前缀
uses:支持self:前缀,用于引用您自己的Gitea实例,例如uses: self:owner/repo@v1或uses: self:owner/repo/.gitea/workflows/build.yml@v1。
使用Go编写Actions
请参阅创建Go Actions。
支持非标准的调度语法 @yearly, @monthly, @weekly, @daily, @hourly
schedule还支持@yearly、@monthly、@weekly、@daily和@hourly,而GitHub不支持。
不支持的工作流语法
jobs.<job_id>.environment
jobs.<job_id>.environment会被忽略。
复杂的runs-on
runs-on支持:
- 静态字符串:
runs-on: self-hosted - 标签数组:
runs-on: [linux, self-hosted] - 字符串表达式:
runs-on: ${{ github.event_name == 'push' && 'ubuntu-latest' || 'self-hosted' }} - 包含表达式的数组:
runs-on: [linux, "${{ github.event_name == 'push' && 'ubuntu-latest' || 'self-hosted' }}"]
缺失的功能
软件包仓库授权
GITEA_TOKEN无法发布到其所属仓库的软件包注册表,例如无法推送OCI镜像。
请改用个人访问令牌,参见此问题。
问题匹配器
问题匹配器会被忽略。
为错误创建注释
错误注释会被忽略。
表达式
表达式支持GitHub的标准函数和上下文。
缺失的UI功能
预处理和后处理步骤
预处理和后处理步骤在Job日志中没有单独的区块。
服务步骤
服务步骤在Job日志中没有单独的区块。
不一样的行为
permissions和jobs.<job_id>.permissions
permissions和jobs.<job_id>.permissions控制GITEA_TOKEN的权限,该权限受仓库和所有者设置的限制,并在fork拉取请求和跨仓库访问时受到进一步限制。
不支持statuses、checks、deployments、security-events和pages等GitHub专有的权限范围,而Gitea额外提供了code、releases、wiki和projects。id-token与GitHub相同,请参阅OpenID Connect。
请参阅Actions Job令牌权限。
下载Actions
未指定主机的Actions(如uses: actions/checkout@v4)会从https://github.com下载,当[actions].DEFAULT_ACTIONS_URL为self时则从您自己的实例下载。
请参阅配置备忘单。
其他来源请参阅Action URL绝对路径和Action前缀。
上下文可用性
不检查上下文可用性,因此env等上下文可以在更多地方使用。