Skip to content

Commit

Permalink
ci: inject environment variables from github action
Browse files Browse the repository at this point in the history
Inject LOG_ENCRYPTION_PUBLIC_KEY from github action to
encrypt sensitive log
  • Loading branch information
Keith-CY committed Aug 11, 2024
1 parent ded929d commit 97bac7f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ jobs:
env:
CI: false

# Inject LOG_ENCRYPTION_PUBLIC_KEY to encrypt sensitive log
- name: Inject environment variables
run: |
echo "LOG_ENCRYPTION_PUBLIC_KEY=${{ secrets.LOG_ENCRYPTION_PUBLIC_KEY }}" >> packages/neuron-wallet/.env
- name: Package for MacOS
if: matrix.os == 'macos-latest'
run: |
Expand Down
2 changes: 1 addition & 1 deletion packages/neuron-wallet/src/services/log-encryption.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default class LogEncryption {
* @param adminPublicKey a PEM-formatted RSA public key
*/
constructor(adminPublicKey: string) {
this.adminPublicKey = adminPublicKey
this.adminPublicKey = adminPublicKey.replace(/\\n/g, '\n')
}

/**
Expand Down

1 comment on commit 97bac7f

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Packaging for test is done in 10339903153

Please sign in to comment.