Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Github workflow_dispatch input dynamic values

I want to invoke a workflow manually and letting the user select a tag value as an input to that workflow

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 }}!"

Is there a way instead of manually enter the value for the tag it can fetch a list of lets say 100 last tag . Or for type: choice the options must be hard coded?

like image 951
Alex Portnoy Avatar asked Mar 01 '26 03:03

Alex Portnoy


1 Answers

I am also looking into making this happen. I do not think it is possible at this time.

like image 90
devakone Avatar answered Mar 03 '26 21:03

devakone



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!