In one of my steps in a github action, I am trying to create a JSON string that I can use in a later step.
I get an error on the following step,
- name: Generate JSON string
run: echo "JSON_STRING=$( jq -n \
--arg image "foo" \
--arg region "us-west-2" \
--arg secret "mysecret" \
--arg env "prod" \
'{"flask":{"image": $image,"ports":{"5000":"HTTP"},"environment":{"FLASK_ENV":$env,"AWS_SECRET_NAME": $secret,"AWS_REGION_NAME": $region}}}' )" >> $GITHUB_ENV
In a terminal shell (ubuntu), I am able to run this command and generate a JSON string.