Skip to content

Commit

Permalink
Updating handling of environment variables
Browse files Browse the repository at this point in the history
Seems like line breaks are sneaking in
  • Loading branch information
DennisAlund committed Sep 19, 2024
1 parent 9746613 commit a1e4800
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/configure_apphosting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ jobs:
id: load_env
run: |
echo "${{ secrets.APP_CMS_DOT_ENV }}" > apps/cms/.env
value=$(grep -m 1 "${{ matrix.config.variable }}" apps/cms/.env | cut -d '=' -f 2 || true)
if [ -z "$value" ]; then
source apps/cms/.env
if [ -z "${{ matrix.config.variable }}" ]; then
echo "Environment variable ${{ matrix.config.variable }} is missing in the .env file!"
exit 1
fi
echo "CONFIG_VALUE=$value" >> $GITHUB_ENV
echo "CONFIG_VALUE=${!matrix.config.variable}" | tr -d '[:space:]' >> $GITHUB_ENV
shell: bash

- name: Save current value to a file
Expand Down

0 comments on commit a1e4800

Please sign in to comment.