Skip to content

Commit

Permalink
feat: using .env file in github action
Browse files Browse the repository at this point in the history
Even if this exposes secrets and config variables, since they should only be mock variables used for local testing it is not a security risk. For production always use a github actions environment with secrets and variables.
  • Loading branch information
maxhoheiser committed Mar 27, 2024
1 parent 5f9c4da commit e120269
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
12 changes: 12 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
AWS_DEFAULT_REGION=us-east-1
AWS_ENDPOINT_URL=http://localhost:4566

REDSHIFT_MASTER_USER=dwh_user
REDSHIFT_MASTER_PASSWORD=123456789Test
REDSHIFT_DB_NAME=streaming_db
REDSHIFT_CLUSTER_NAME=redshift-cluster
REDSHIFT_TABLE_NAME=user_health_data

KINESIS_STREAM_NAME=kinesis-stream

S3_BUCKET_NAME=firehose-raw-data
14 changes: 7 additions & 7 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,6 @@ env:
AWS_ENDPOINT_URL: http://localhost:4566
AWS_ACCESS_KEY_ID: test
AWS_SECRET_ACCESS_KEY: test
REDSHIFT_MASTER_USER: usernamered
REDSHIFT_MASTER_PASSWORD: RedPw1234
REDSHIFT_DB_NAME: streaming_db
REDSHIFT_CLUSTER_NAME: redshift-cluster
REDSHIFT_TABLE_NAME: user_health_data
KINESIS_STREAM_NAME: kinesis-stream
S3_BUCKET_NAME: firehose-raw-data

jobs:
cdk:
Expand All @@ -33,6 +26,13 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Load .env file
uses: xom9ikk/dotenv@v2
with:
path: ./
mode: ""
load-mode: strict

- name: Setup Node.js
uses: actions/setup-node@v3
with:
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ celerybeat.pid
*.sage.py

# Environments
.env
.venv
env/
venv/
Expand Down

0 comments on commit e120269

Please sign in to comment.