Github工作流动态输入值

12
我想手动调用一个工作流,并让用户选择一个标签值作为该工作流的输入。
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个标签的列表?或者对于类型:choice,选项必须进行硬编码吗?


相关的 Github 问题:https://github.com/community/community/discussions/11795 - Himmet Avsar
1个回答

0

我也在研究如何实现这个功能。但我认为目前还不可能。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接