Skip to content

Commit

Permalink
updated test file
Browse files Browse the repository at this point in the history
  • Loading branch information
yairsimantov20 committed Feb 20, 2024
1 parent 29711c5 commit e6860b6
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions sail/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,16 @@ runs:
echo "OCEAN__PORT__CLIENT_ID=${{ inputs.port_client_id }}" >> .env
echo "OCEAN__PORT__CLIENT_SECRET=${{ inputs.port_client_secret }}" >> .env
for key in ${{ inputs.additional_env_vars.keys() }}; do
echo "$key=${{ inputs.additional_env_vars[key] }}" >> .env
# Assuming additional_env_vars is a JSON object
ENV_VARS_JSON="${{ inputs.additional_env_vars }}"
# Convert JSON to a Bash array
ENV_VARS_ARRAY=($(echo $ENV_VARS_JSON | jq -r 'keys_unsorted[]'))
# Iterate over the keys
for KEY in "${ENV_VARS_ARRAY[@]}"; do
VALUE=$(echo $ENV_VARS_JSON | jq -r ".$KEY")
echo "$KEY=$VALUE" >> .env
done
docker run -i --rm \
Expand Down

0 comments on commit e6860b6

Please sign in to comment.