Skip to content

[TM-1850] Get sensitive ENV variables from github secrets #85

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 12, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/deploy-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,17 @@ jobs:
echo "${{ vars.ENV }}" > .env
echo "DB_PASSWORD=\"${{ secrets.DB_PASSWORD }}\"" >> .env
echo "MAIL_PASSWORD=\"${{ secrets.MAIL_PASSWORD }}\"" >> .env
echo "JWT_SECRET=\"${{ secrets.JWT_SECRET }}\"" >> .env
echo "AIRTABLE_API_KEY=\"${{ secrets.AIRTABLE_API_KEY }}\"" >> .env
echo "SENTRY_DSN=\"${{ secrets.SENTRY_DSN }}\"" >> .env
echo "SLACK_API_KEY=\"${{ secrets.SLACK_API_KEY }}\"" >> .env
: # Don't build the base image with NODE_ENV because it'll limit the packages that are installed
docker build -t terramatch-microservices-base:nx-base .
SERVICE_IMAGE=$ECR_REGISTRY/$ECR_REPOSITORY:${{ env.IMAGE_TAG }}
docker build \
--build-arg NODE_ENV=production \
--build-arg DEPLOY_ENV=${{ inputs.env }} \
--build-arg SENTRY_DSN="${{ vars.SENTRY_DSN }}" \
--build-arg SENTRY_DSN="${{ secrets.SENTRY_DSN }}" \
--build-arg BUILD_FLAG='--prod --verbose --no-cloud' \
-f apps/${{ inputs.service }}/Dockerfile \
-t $SERVICE_IMAGE .
Expand Down
Loading