You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

GitHub Actions是否支持标记workflow_call输入参数为已弃用?

GitHub Actions workflow_call 输入的弃用方案

目前GitHub官方没有为workflow_call的输入提供专门的官方弃用元数据配置项(比如类似deprecated: true这类标记字段)。

不过社区有通用的约定做法来标记输入已弃用,核心是通过输入的描述字段明确告知使用者:

  • 在description中直接标注「已弃用」,同时说明替代方案,示例代码如下:
    on:
      workflow_call:
        inputs:
          my-input:
            description: "[已弃用] 该输入字段不再推荐使用,请改用 `new-my-input`"
            required: false
            default: my-value
            type: string
          new-my-input:
            description: 替代 my-input 的新输入字段
            required: false
            default: my-value
            type: string
    
  • 保留原输入的兼容性设置(比如维持默认值、不设为必填),避免依赖该输入的现有工作流突然失效。

这种方式虽然没有官方的元数据支持,但能清晰传递弃用信息,是当前业内普遍采用的做法。

内容的提问来源于stack exchange,提问作者Valentin Vignal

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.12 15:15:53