Skip to content

Can Docker action receive a list as an input argument? #26938

Answered by Yanjingzhu
dingo-d asked this question in Actions
Discussion options

You must be logged in to vote

Hi @dingo-d , 

The input variable type only supports string , number and boolean. So an input key with array value is not supported. You could consider to convert the string into array in entrypoint.sh . 

>>Are those inputs passed as env variables inside the script that I could then reference with names instead of numbers, like $wp-db-name etc.? 

There are env variables for inputs when using the docker container action. But the env name has an INPUT_  prefix and all the letters are in uppercase.  Please note that ‘-’ is an invalid charture in shell variable name, you could use ‘_’ instead. I change all the input variables to use ‘_’ .  Such as ‘wp_db_name’ .

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants