Repository_dispatch client_payload JSON with arrays

I am using the on: repository_dispatch event and looking to send a custom JSON payload which will contain an array like:

{"event_type": "update-helm-image-tags", "client_payload": { "applications": ["server", "worker"], "environments": ["dev", "stage"], "image_tag": "${{ env.DOCKER_IMAGE_TAG }}" }}

How in the GitHub action itself can I grab the entire array values of github.event.client_payload.applications? Currently this value is literally the string Array. I am looking for it to be exploded into a string separated by commas.

github.event.client_payload.applications = Array

Solution is to use the built-in function:

join(github.event.client_payload.applications, ',')
1 Like