You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you 🙇♀ for wanting to create an issue in this repository. Before you do, please ensure you are filing the issue in the right place. Issues should only be opened on if the issue relates to code in this repository.
If you are having an issue or question about GitHub Actions then please contact customer support
If your issue is relevant to this repository, please include the information below:
Describe the enhancement
An action should be able to have an input type which is a list of strings. The toolkit should provide a getInput overload or new method to retrieve it.
Code Snippet
letvals: string[]=core.getListInput('inputName');
Additional information
Add any other context about the feature here.
Reacted by Brian Surowiec, Matthias Lohscheidt, Clare Liguori, Teoh Han Hui, Andreas Möller, Josh Gross, Henry Schreiner, Régis Belson, Julien Karst , Joshua Napoli and 159 more
Reacted by Konstantin S., Dan Miller, Bengt Brodersen, Igor Petrik, Gabrielle Singh Cadieux, Chris Cureau, Grzegorz, Oleg Pavlenko, Jason Aricheta and Chris Schindlbeck
@AB-xdev, as far as I can tell, #829 implements support for values spanning multiple lines, not lists. With the implemented core.getMultilineInput() the following should be possible:
@asbjornu Good extension! I created #1183 to also implement the second case. Not sure how to implement the last case since these parameters are passed as an environment parameter.
I'm happy with this workaround posted on StackOverflow:
Definition: Use a property of type string and a literal with the JSON representation of the list, e.g. products: '["yellow", "green"]'
Use: Decode the string literal to a JSON list, e.g. ${{ fromJSON(inputs.products) }}
Example:
on:
workflow_dispatch:
inputs:
products:
description: "List of Products"default: '["yellow"]'limits:
description: "List of limits"default: '[50]'jobs:
build:
runs-on: ubuntu-lateststrategy:
matrix:
product: ${{ fromJSON(github.event.inputs.products) }}limits: ${{ fromJSON(github.event.inputs.limits) }}
Reacted by Aaron Bull Schaefer, Michaël Le Barbier, Hicham Azimani, Adriano de Abreu Wanderley, Tomas Balaz, Dmytro Mirian, Peter Benjamin, Moshe Azaria, Harshita Gupta, bastien brunod and 4 more
Activity
kiprasmel commentedon Feb 6, 2020
I was going through https://github.com/actions/cache trying to implement multiple path support, and when going through source code, I only noticed the
core.getInputfunction, but not one forcore.getInputsto get multiple of them.Then, later, I found this:
so, is
the official way of doing it?
If so, I've created a PR to implement this: #336
AB-xdev commentedon Aug 31, 2021
Was this fixed with #829?
asbjornu commentedon Jul 28, 2022
@AB-xdev, as far as I can tell, #829 implements support for values spanning multiple lines, not lists. With the implemented
core.getMultilineInput()the following should be possible:However, the following is still not possible:
Neither is this:
rickstaa commentedon Sep 25, 2022
@asbjornu Good extension! I created #1183 to also implement the second case. Not sure how to implement the last case since these parameters are passed as an environment parameter.
git-developer commentedon Aug 6, 2023
I'm happy with this workaround posted on StackOverflow:
stringand a literal with the JSON representation of the list, e.g.products: '["yellow", "green"]'${{ fromJSON(inputs.products) }}Example:
Edwardius commentedon Oct 18, 2023
can we have this pwease :3
feat: add 'getCommaSeparatedInput' method
sroomberg-ep commentedon Mar 27, 2025
Any movement on supporting list inputs?
iamstarkov commentedon Apr 9, 2025
@sroomberg-ep I believe you are looking for
getMultilineInputmerged from #829I also have a pull-request which addresses similar feature request, but it has been unreviewed for few months #1926