Skip to content

Commit

Permalink
ci: fix to_envs single .env file parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Oct 20, 2023
1 parent cd8da20 commit 222aa39
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ jobs:
VARS_CONTEXT: ${{ toJson(vars) }}
SECRETS_CONTEXT: ${{ toJson(secrets) }}
run: |
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
to_envs() { jq -r "to_entries[] | \"\(.key)<<$EOF\n\(.value)\n$EOF\n\""; }
to_envs() { jq -r "to_entries[] | \"\(.key)=\(.value)\""; }
echo "GIT_BRANCH=${GIT_BRANCH}" >> $GITHUB_ENV
echo "${{ env.VARS_CONTEXT }}" | to_envs >> $GITHUB_ENV
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/r-pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ jobs:
VARS_CONTEXT: ${{ toJson(vars) }}
SECRETS_CONTEXT: ${{ toJson(secrets) }}
run: |
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
to_envs() { jq -r "to_entries[] | \"\(.key)<<$EOF\n\(.value)\n$EOF\n\""; }
to_envs() { jq -r "to_entries[] | \"\(.key)=\(.value)\""; }
echo "API_TAG_OVERRIDE=${API_TAG_OVERRIDE}" >> $GITHUB_ENV
echo "GIT_BRANCH=${GIT_BRANCH}" >> $GITHUB_ENV
Expand Down

0 comments on commit 222aa39

Please sign in to comment.