Skip to content

Commit

Permalink
ensure that SENTRY_DSN and SENTRY_RELEASE are declared at build time (#…
Browse files Browse the repository at this point in the history
…5369)

* ensure that NEXT_PUBLIC_SENTRY_DSN and SENTRY_RELEASE are declared at Docker build time
  • Loading branch information
rhelmer authored Dec 5, 2024
1 parent 67effd3 commit 29b1f9f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/docker_build_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,12 @@ jobs:
env:
UPLOAD_SENTRY_SOURCEMAPS: true
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_RELEASE: ${{ github.ref }}
NEXT_PUBLIC_SENTRY_DSN: ${{ env.NEXT_PUBLIC_SENTRY_DSN }}
run: |
docker build --tag blurts-server \
--build-arg SENTRY_RELEASE="$SENTRY_RELEASE" \
--build-arg NEXT_PUBLIC_SENTRY_DSN="$NEXT_PUBLIC_SENTRY_DSN" \
--secret id=SENTRY_AUTH_TOKEN \
.
Expand All @@ -56,4 +59,3 @@ jobs:
# deploy main
docker tag blurts-server ${{ steps.meta.outputs.tags }}
docker push ${{ steps.meta.outputs.tags }}
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ ENV S3_BUCKET=$S3_BUCKET
ARG SENTRY_RELEASE
ENV SENTRY_RELEASE=$SENTRY_RELEASE

ARG NEXT_PUBLIC_SENTRY_DSN
ENV NEXT_PUBLIC_SENTRY_DSN=$NEXT_PUBLIC_SENTRY_DSN

ARG UPLOAD_SENTRY_SOURCEMAPS
ENV UPLOAD_SENTRY_SOURCEMAPS=$UPLOAD_SENTRY_SOURCEMAPS

Expand Down

0 comments on commit 29b1f9f

Please sign in to comment.