跳转到内容

cnb-rs repo tag annotation

cnb-rs repo tag annotation <subcommand>

Tag 的元数据(key=value 键值对)管理。与 commit annotation 是同类机制,绑定对象从 commit 改为 tag。

典型用途

  • 标记 release 元数据:builder=github-actions sbom=https://... signed_by=cnb-bot
  • 关联外部系统:jira=PROJ-1234 crq=CHG12345
  • 审计追踪:构建时戳、签名者、CI pipeline ID

子命令

示例

bash
# 设置多个 annotations 一次性
cnb-rs --repo wwvo/cnb-rs/cnb-rs repo tag annotation set v1.0.0 \
    builder=github-actions \
    sbom=https://example.com/sbom.spdx.json \
    signed_by=release-bot

# 列出
cnb-rs --repo wwvo/cnb-rs/cnb-rs repo tag annotation list v1.0.0

# 删除某个 key
cnb-rs --repo wwvo/cnb-rs/cnb-rs repo tag annotation rm v1.0.0 builder -y

另请参阅

Released under the MIT License.