Skip to content

Commit

Permalink
fix: path for .env
Browse files Browse the repository at this point in the history
  • Loading branch information
nischalstha9 committed Sep 4, 2024
1 parent ab1bbf7 commit e71f56e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/frontend-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,18 +104,16 @@ jobs:
env:
VARS_CONTEXT: ${{ toJson(vars) }}
SECRETS_CONTEXT: ${{ toJson(secrets) }}
shell: bash
run: |
# Parse JSON with multiline strings
to_envs() { jq -r "to_entries[] | \"\(.key)=\(.value)\""; }
# Create .env file from VARS_CONTEXT
if [ "${VARS_CONTEXT}" != "null" ]; then
echo "${VARS_CONTEXT}" | to_envs > ${{ inputs.context }}/.env
echo "${VARS_CONTEXT}" | to_envs > ${{ inputs.context }}/.env
fi
# Append Secrets to .env file from SECRETS_CONTEXT
if [ "${SECRETS_CONTEXT}" != "null" ]; then
echo "\n${SECRETS_CONTEXT}" | to_envs >> ${{ inputs.context }}/.env
echo "\n${SECRETS_CONTEXT}" | to_envs >> ${{ inputs.context }}/.env
fi
- id: build_frontend
Expand Down

0 comments on commit e71f56e

Please sign in to comment.