Skip to content

Commit

Permalink
Upload secret manager cicd with AWS (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
TriSBie authored Aug 22, 2024
1 parent 9d314ee commit 0a0f890
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ jobs:
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2

- name: Load secrets and save to .env
run: aws secretsmanager get-secret-value --secret-id simple_bank --query SecretString --output text | jq -r 'to_entries|map("\(.key)=\(.value)")|.[]' > app.env

- name: Build, tag, and push docker image to Amazon ECR
env:
REGISTRY: ${{ steps.login-ecr.outputs.registry }}
Expand Down
2 changes: 1 addition & 1 deletion app.env
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
DB_DRIVER=postgres
DB_SOURCE=postgresql://root:secret@localhost:5432/simple_bank?sslmode=disable
SERVER_ADDRESS=0.0.0.0:8082
TOKEN_SYMMETRIC_KEY=12345678912345678912345678912345
TOKEN_SYMMETRIC_KEY=5e2343a49891c39e89b4de57ac68ea9f
ACCESS_TOKEN_DURATION=15m

0 comments on commit 0a0f890

Please sign in to comment.