From ce5db8d630eb9895cd52a4a9093e3ea0cb8357f6 Mon Sep 17 00:00:00 2001 From: Henry <31442053+HenrySpartGlobal@users.noreply.github.com> Date: Tue, 9 Apr 2024 19:00:31 +0100 Subject: [PATCH] fix: add build arg in gh actions (#80) (#81) * don't bake in the sensitive values on build time * push to ecr instead, remove baked in envs in dockerfile * push to ecr instead, remove baked in envs in dockerfile --- .github/workflows/deploy-live.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-live.yml b/.github/workflows/deploy-live.yml index 8254186..cc89e68 100644 --- a/.github/workflows/deploy-live.yml +++ b/.github/workflows/deploy-live.yml @@ -25,7 +25,14 @@ jobs: - name: Build Docker image run: | - docker build -t in-house-queue-site . + docker build -t inhousequeue-site \ + --build-arg DATABASE_URL=${{ secrets.DATABASE_URL }} \ + --build-arg NEXTAUTH_SECRET=${{ secrets.NEXTAUTH_SECRET }} \ + --build-arg DISCORD_CLIENT_ID=${{ secrets.DISCORD_CLIENT_ID }} \ + --build-arg DISCORD_CLIENT_SECRET=${{ secrets.DISCORD_CLIENT_SECRET }} \ + --build-arg UPSTASH_REDIS_REST_URL=${{ secrets.UPSTASH_REDIS_REST_URL }} \ + --build-arg UPSTASH_REDIS_REST_TOKEN=${{ secrets.UPSTASH_REDIS_REST_TOKEN }} \ + . - name: Login to Amazon ECR uses: aws-actions/configure-aws-credentials@v4