【问题标题】:Github workflow_dispatch input dynamic valuesGithub workflow_dispatch 输入动态值
【发布时间】: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


    【解决方案1】:

    我也在考虑实现这一点。我认为目前不可能。

    【讨论】:

      猜你喜欢
      • 2022-11-10
      • 1970-01-01
      • 2022-01-06
      • 2022-06-10
      • 2021-07-16
      • 2021-12-15
      • 1970-01-01
      • 1970-01-01
      • 2021-03-27
      相关资源
      最近更新 更多