Skip to content

Support "multi-choice" input type for manual workflows #2076

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
DpoBoceka opened this issue Aug 22, 2022 · 321 comments
Open

Support "multi-choice" input type for manual workflows #2076

DpoBoceka opened this issue Aug 22, 2022 · 321 comments
Labels
enhancement New feature or request

Comments

@DpoBoceka
Copy link

Describe the enhancement
Current set of input types doesn't cover some use-cases for manual workflows

We use a single gh-action as an entrypoint of deploying packages from our monorepo, and sometimes we need to manually deploy several packages simultaneously. Up until now we just went with a set of Booleans, so we could tick all the packages we needed to run our CI/CD against via UI. However, we speedily reached a limit of 10 input values

Introducing an input type that would store a, say, json array could help:

on:
  workflow_dispatch:
    inputs:
      name:
        type: multi-choice
        description: select packages
        options: 
        - go-service1
        - go-service2
        - py-service1

...and in fact would be more logical with less copy-paste overhead for our use-case

@DpoBoceka DpoBoceka added the enhancement New feature or request label Aug 22, 2022
@MaikGudi
Copy link

I run into the same problem. We want to select multiple schemes to build for our iOS App but we have way more than 10 schemes. It would be definitely a helpful feature. Otherwise, you have to work with the string input type, which can lead to input errors.

@Ido-Ozeri
Copy link

+1

10 similar comments
@BondLi1
Copy link

BondLi1 commented Dec 5, 2022

+1

@paul-gladoon
Copy link

+1

@kaira
Copy link

kaira commented Dec 7, 2022

+1

@mato1411
Copy link

mato1411 commented Dec 8, 2022

+1

@MatanHeledPort
Copy link

+1

@danielsinai
Copy link

+1

@mirzaeiyan
Copy link

+1

@kc-mzb
Copy link

kc-mzb commented Jan 9, 2023

+1

@Dimitris-Mil
Copy link

+1

@victorchurikovcommonground

+1

@priyanthabuddhika
Copy link

I would be really great feature to have since many use cases are there.

@joshua-reddish
Copy link

+1

3 similar comments
@vincda
Copy link

vincda commented Jan 27, 2023

+1

@patriziobrunops
Copy link

+1

@japseabery
Copy link

+1

@chillybug
Copy link

+1
I want to use this feature to pass dynamic matrix strategy for manual workflows.

@paulspiegel
Copy link

+1

10 similar comments
@jwilson232
Copy link

+1

@dcruzrinkel
Copy link

+1

@vbotay
Copy link

vbotay commented Feb 3, 2023

+1

@pearlberry
Copy link

+1

@djoshi0
Copy link

djoshi0 commented Feb 8, 2023

+1

@gheorghesava-mck
Copy link

+1

@galz-cyera
Copy link

+1

@monsma
Copy link

monsma commented Feb 9, 2023

+1

@n-tangufor
Copy link

+1

@NP-compete
Copy link

+1

@tafaust
Copy link

tafaust commented Feb 9, 2025

+1

7 similar comments
@kasivenkat
Copy link

+1

@sandstrom
Copy link

👍🏻

@nickgonzfoxeng
Copy link

+1

@SerhiiBasetskyi
Copy link

+1

@bamarcisz-fadv
Copy link

+1

@srinathreddydudi
Copy link

+1

@Oscaner
Copy link

Oscaner commented Feb 27, 2025

+1

@ashishbhatt07
Copy link

+10

@AndyLysenko
Copy link

+1

7 similar comments
@yx-altera
Copy link

+1

@qnp
Copy link

qnp commented Mar 2, 2025

+1

@Himmelschrei
Copy link

+1

@martinsamouiller
Copy link

+1

@adsz01
Copy link

adsz01 commented Mar 6, 2025

+1

@JoseNoguera-uala
Copy link

+1

@kxs581
Copy link

kxs581 commented Mar 6, 2025

+1

@Andre-Medina
Copy link

  • 1

@AlanHale25
Copy link

+1

@marcelin
Copy link

Hi,

Can you try this?

name: "Multi-select"
run-name: 🎯${{ github.workflow}} by @${{ github.actor }}

on:
  workflow_dispatch:
    inputs:
      dev:
        description: 'Deploy to dev'
        default: false
        type: boolean
      staging:
        description: 'Deploy to staging'
        default: false
        type: boolean
      qat:
        description: 'Deploy to qat'
        default: false
        type: boolean
      prod:
        description: 'Deploy to prod'
        default: false
        type: boolean

jobs:
  get-selected:
    name: Get environment
    runs-on: ubuntu-latest
    outputs: 
      selectedJson: ${{ steps.get-selected-step.outputs.selected }}
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Get Selected
        id: get-selected-step
        uses: joao-zanutto/get-selected@v1.1.1
        with:
          format: json

  plan-env:
    needs: get-selected
    runs-on: ubuntu-latest
    strategy:
      matrix:
        app: ${{ fromJSON(needs.get-selected.outputs.selectedJson) }}
    steps:
      - name: Checkout
        uses: actions/checkout@v4
     ....
Image

@dboriichuk
Copy link

Hi,

Can you try this?

name: "Multi-select"
run-name: 🎯${{ github.workflow}} by @${{ github.actor }}

on:
  workflow_dispatch:
    inputs:
      dev:
        description: 'Deploy to dev'
        default: false
        type: boolean
      staging:
        description: 'Deploy to staging'
        default: false
        type: boolean
      qat:
        description: 'Deploy to qat'
        default: false
        type: boolean
      prod:
        description: 'Deploy to prod'
        default: false
        type: boolean

jobs:
  get-selected:
    name: Get environment
    runs-on: ubuntu-latest
    outputs: 
      selectedJson: ${{ steps.get-selected-step.outputs.selected }}
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Get Selected
        id: get-selected-step
        uses: joao-zanutto/get-selected@v1.1.1
        with:
          format: json

  plan-env:
    needs: get-selected
    runs-on: ubuntu-latest
    strategy:
      matrix:
        app: ${{ fromJSON(needs.get-selected.outputs.selectedJson) }}
    steps:
      - name: Checkout
        uses: actions/checkout@v4
     ....
Image

Definitely, this works, the problem is that multi-choice is tightly coupled with limited number of inputs for workflow dispatch (10 max), so in many cases we don't want to have 8 boolean inputs, as it's necessary to have at least 5 another parameters

@origranot
Copy link

+100

@jordi-domingo
Copy link

+1

3 similar comments
@marcelin
Copy link

+1

@GCbeheo
Copy link

GCbeheo commented Apr 27, 2025

+1

@Gnts
Copy link

Gnts commented Apr 30, 2025

+1

@alex-slytrunk
Copy link

+100

@juha-suokas
Copy link

+1

2 similar comments
@potiuk
Copy link

potiuk commented May 7, 2025

+1

@benjyabr
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests