When creating my own Docker action, I can pass arguments to it using
with key in my workflow yml file. For instance
- name: Run tests in the container uses: email@example.com with: wp-db-name: 'wordpresstest' wp-db-user: 'admin' wp-db-pass: 'password' wp-db-host: 'mysql' wp-user: 'admin' wp-pass: 'password'
In my action’s entrypoint.sh script I can then reference the
wp-db-name with $1,
wp-db-user with $2, etc.
Is it possible to have a key that will have a value that is an array, like:
option: [option1, option2, option3]
If that is possible, how would I reference that in my entrypoint.sh?
Are those inputs passed as env variables inside the script that I could then reference with names instead of numbers, like
The aim is to reference that key with array value so that I can loop through it in my bash script.