Skip to content

Commit

Permalink
Fix incomplete environment variable replacement in CI/CD
Browse files Browse the repository at this point in the history
  • Loading branch information
ThrRip committed Nov 8, 2023
1 parent dbf5587 commit d17e665
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ jobs:
- name: Replace environment variables
run: |
[ -z "${{ secrets[format('PROD_{0}_PM2_CONF_ENV', inputs.package_cap)] }}" ] || (
temp=$(mktemp)
echo "${{ secrets[format('PROD_{0}_PM2_CONF_ENV', inputs.package_cap)] }}" |
awk '
/env: {/,/}/ {
Expand All @@ -58,7 +59,9 @@ jobs:
next
}
{ print }
' packages/${{ inputs.package }}/ecosystem.config.js
' packages/${{ inputs.package }}/ecosystem.config.js > "$temp"
cp --no-preserve=all "$temp" packages/${{ inputs.package }}/ecosystem.config.js
rm -f "$temp"
)
- name: Package the build
run: |
Expand Down
1 change: 1 addition & 0 deletions .idea/dictionaries/thrrip.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d17e665

Please sign in to comment.