From f7e75680860185fc9082c2d7d7bab4062888f6b1 Mon Sep 17 00:00:00 2001 From: Jycssu Date: Tue, 11 Jun 2024 16:32:18 +0200 Subject: [PATCH] chore: use build args on docker for thegraph api key --- .github/workflows/branch.yml | 2 ++ Dockerfile | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/branch.yml b/.github/workflows/branch.yml index e759e39..1011e9b 100644 --- a/.github/workflows/branch.yml +++ b/.github/workflows/branch.yml @@ -48,6 +48,8 @@ jobs: context: . push: true tags: ${{ secrets.DOCKER_REGISTRY }}/dashboard:${{ github.ref_name }} + build-args: | + 'NEXT_PUBLIC_THEGRAPH_API_KEY=${{ secrets.NEXT_PUBLIC_THEGRAPH_API_KEY }}' env: NEXT_PUBLIC_THEGRAPH_API_KEY: ${{ secrets.NEXT_PUBLIC_THEGRAPH_API_KEY }} diff --git a/Dockerfile b/Dockerfile index 3e5307f..470b16a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,6 +16,8 @@ FROM node:16-alpine AS builder WORKDIR /app COPY --from=deps /app/node_modules ./node_modules COPY . . +ARG NEXT_PUBLIC_THEGRAPH_API_KEY +ENV NEXT_PUBLIC_THEGRAPH_API_KEY ${NEXT_PUBLIC_THEGRAPH_API_KEY} RUN yarn build