Skip to content

Commit

Permalink
another key..
Browse files Browse the repository at this point in the history
  • Loading branch information
traceypooh committed Jan 26, 2025
1 parent b0337f9 commit ad3afa9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ jobs:
NO_TEST: true
secrets:
NOMAD_TOKEN_EXT: ${{ secrets.NOMAD_TOKEN_EXT }}
NOMAD_SECRETS: '{ "APP_ID"="${{ secrets.APP_ID }}", "RSA"="${{ secrets.RSA }}" }'
NOMAD_SECRETS: '{ "APP_ID"="${{ secrets.APP_ID }}", "RSA"="${{ secrets.RSA }}", "RSA_PKEY"="${{ secrets.RSA_PKEY }}" }'
7 changes: 5 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@

# create our config on-demand from our runtime-only environment variables passed in to us

# the key env var needs to be base64 encoded for transport, and we'll unpack it to:
# the key env vars need to be base64 encoded for transport, and we'll unpack it to:
# "-----BEGIN RSA PRIVATE KEY-----\n[..KEY..]\n-----END RSA PRIVATE KEY-----"

export NODE_ENV=production
export PORT=80
export GITHUB_PRIVATE_KEY=$(echo "$RSA" |base64 -d|sed ':a;N;$!ba;s/\n/\\n/g')
export GITHUB_APP_ID=$APP_ID
# for this first one, eg: https://travistidwell.com/jsencrypt/demo/
export RSA_PRIVATE_KEY=$(echo "$RSA_PKEY" |base64 -d|sed ':a;N;$!ba;s/\n/\\n/g')
export GITHUB_PRIVATE_KEY=$(echo "$RSA" |base64 -d|sed ':a;N;$!ba;s/\n/\\n/g')


# cat >| config.production.json <<EOF
# {
Expand Down

0 comments on commit ad3afa9

Please sign in to comment.