【发布时间】:2022-01-17 20:45:10
【问题描述】:
我想手动调用一个工作流并让用户选择一个标签值作为该工作流的输入
on:
workflow_dispatch:
inputs:
DEPLOY_VERSION:
description: 'Tag Version (0.0.1)'
required: true
ENV:
type: choice
description: 'Environment'
required: false
options:
- dev
- prodga
default: 'dev'
jobs:
deploy:
name: "Deploying ${{ github.event.inputs.DEPLOY_VERSION }} to ${{ github.event.inputs.ENV }} by ${{ github.actor }}"
runs-on: ubuntu-latest
steps:
- run: |
echo "Deploying ${{ github.event.inputs.DEPLOY_VERSION }}!"
echo "To ${{ github.event.inputs.ENV }}!"
有没有办法代替手动输入标签的值,它可以获取一个列表,比如说 100 last tag 。或者对于 type:choice 选项必须是硬编码的?
【问题讨论】:
标签: github github-actions