Replies: 20 comments 18 replies
|
Hi @HavenDV - we don't have any immediately plans here. Can you tell me a little more about how you envision using arrays? I'd love to understand your use case a little bit better. |
|
Another good usecase is self hosted runners + reusable workflows. I want to pass the "run-on" to the reusable workflow and in case of self-hosted I have to pass at least 2 items. Not having a list type makes this task a bit tricky. |
|
another use case we found while configuring cypress was the matrix parameter for on how many instances this is supposed to run |
|
In my case, I need comma-separated values dynamically from the Manual triggering workflow. So here is my solution |
|
I have an dumb but solvable solution case You can input arrays that use double and single quotes: workflow_call:
inputs:
runs-on:
default: "['ubuntu-latest']"
required: false
type: stringthen use strategy:
matrix:
os: ${{ fromJson(inputs.runs-on) }}
runs-on: ${{ matrix.os }}
That'll work, but this should be a problem that GitHub needs to solve.🤨 |
|
I was looking for this in the docs. Guess it's still not an option, so I'm either going to have to run the called workflow |
|
My usecase is a bit different I have a custom action which will delete the current folder after the jobs runs, this is because we are using a persistent instance as a runner. I would love to be able to add an input that will be an array of directories, that array will be defined by the workflow where I'm calling this action from and used inside the action to delete the desired folders. |
|
Today, I have an Atlas Operator re-useable workflow that takes in a handful of inputs. It updates the appropriate manifests via Kustomize based on said inputs, but given the general nature of workflows, we can only make one deployment update per workflow run. What would be ideal is if I could define this I realize this is where I may be in the wrong place.. so please redirect me if so Now, I realize I can (and am actively working on such) pass an array of said |
|
@ethomson It has been a year and a half since the ticket was created, and the community has provided incredibly valuable feedback. We're eager to know if there have been any developments in this regard, or if there are any plans to extend support for list-type (perhaps even dictionary-type) inputs. |
|
Hi. Any update on this? This discussion has plenty of good use cases, and the workarounds are all pretty clunky. Would be great to get this feature properly supported. |
|
+1 for array as an input. My use case is also passing multiple args to docker build as mentioned above. There are workarounds but they are errorprone and hacky. |
|
Any update on getting this feature supported? I implemented an "array type" via the workarounds shared here, but it's not perfect by any means. Using a combination of the existing string type and the |
|
The |
|
+1 for arrays as input parameters . we are building reusable workflows for our platform users and without this feature we are losing the readability and usability of the re-usable workflow. the goal is to pass n strings as input to a task inside a job that prepares an artifact and upload to github artefacts. |
|
Will be any work on this @ethomson? I think this will make reusable workflows way better. I suggest the following syntax: |
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
|
Hello! Sorry Actions product has been quiet here, this is cool feedback and the use case makes sense. We are currently reviewing re-usability all up in Actions (this + composite Action feedback + yaml anchor feedback) to work out how we get all these things right and move forward in a way that works for y'all. I will ensure that we include this in what we are thinking as one of the items. Thank you for all engaging over such a long period and please keep sharing your feedback, we do read the comments and what your use cases our help us build a better product <3 |
|
I agree that it would be great to define the input type as string, list, etc. A workaround while waiting for GitHub to update the functionality. Instead of a one-liner list... inputs:
my_paramater: "['value1', 'value2', 'value3']"... the end-user can use the greater than character inputs:
my_paramater: >
"['value1',
'value2',
'value3']" |
|
This did it for my use case |
Uh oh!
There was an error while loading. Please reload this page.
Is there any plan to support arrays for reusable workflow? I mean this - https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onworkflow_callinputsinput_idtype
All reactions