我有一个像blow这样的workflow_dispatch触发器:
我需要定义验证,以便 logLevel 必须在特定的值集中['info', 'warning', 'error']
我知道我可以执行 bash if 命令并检查值。但我宁愿不这样做。
有内置的方法可以做到这一点吗?
小智 7
Github Actions 中的手动触发工作流程现在支持choice输入类型,因此您可以执行类似的操作,用户会将其视为下拉列表。
on:
workflow_dispatch:
inputs:
logLevel:
type: choice
description: Log level
default: warning
options:
- info
- warning
- error
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2022 次 |
| 最近记录: |