Can action inputs be arrays?

I’m trying set an input to an array of objects:

It seems like GitHub does not currently support arrays for action inputs? I get this error:

Your workflow file was invalid: The pipeline is not valid. .github/workflows/test.yml (Line: 60, Col: 13): A sequence was not expected

The error message is not very clear, but I assume it means that it expects a simple value, not an array?


Action inputs only supports string keys and string values at this time. This is because they translate to environment variables within the action’s execution run.

Your action can however parse that string value. For example, I parse one of the inputs in my GH Releases action by splitting on newlines

-name:Releaseuses:softprops/action-gh-release@v1if:startsWith(github.ref, 'refs/tags/')with:
files:| Release.txt LICENSE

In you’re case you could do potentially something with a bit more structure but that structure needs to be serialized within a yaml string


As another workaround I use JSON as string value for action input.


servers:'[{"id": "serverId", "username": "username", "password": "password"}]'

great solution, thanks