Skip to content
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

Hotfix: make the build aware of NEXT_PUBLIC_ORY_SDK_URL and pull this… #1120

Merged
merged 1 commit into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
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
8 changes: 4 additions & 4 deletions .github/workflows/aws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ env:
NOVU_API_KEY: ${{ secrets.DEVELOPMENT_NOVU_API_KEY }}
NOVU_APPLICATION_IDENTIFIER: ${{ secrets.DEVELOPMENT_NOVU_APPLICATION_IDENTIFIER }}
NEW_RELIC_APP_NAME: ${{ secrets.DEVELOPMENT_NEW_RELIC_APP_NAME }}
NEXT_PUBLIC_ORY_SDK_URL: ${{ secrets.NEXT_PUBLIC_ORY_SDK_URL }}

GITLAB_FEATURE_FLAG_URL: ${{ secrets.GITLAB_FEATURE_FLAG_URL }}
GITLAB_FEATURE_FLAG_INSTANCE_ID: ${{ secrets.GITLAB_FEATURE_FLAG_INSTANCE_ID }}
# Needed env variables for first build on next
Expand Down Expand Up @@ -68,7 +66,7 @@ jobs:
echo "NOVU_API_KEY=${{ secrets.PRODUCTION_NOVU_API_KEY }}" >> $GITHUB_ENV
echo "NOVU_APPLICATION_IDENTIFIER=${{ secrets.PRODUCTION_NOVU_APPLICATION_IDENTIFIER }}" >> $GITHUB_ENV
echo "NEW_RELIC_APP_NAME=${{ secrets.PRODUCTION_NEW_RELIC_APP_NAME }}" >> $GITHUB_ENV
echo "NEXT_PUBLIC_ORY_SDK_URL=${{ secrets.NEXT_PUBLIC_ORY_SDK_URL }}" >> $GITHUB_ENV
echo "NEXT_PUBLIC_ORY_SDK_URL=${{ secrets.ORY_SDK_URL }}" >> $GITHUB_ENV

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
Expand Down Expand Up @@ -130,6 +128,8 @@ jobs:
run: |
docker build --build-arg ENVIRONMENT=$ENVIRONMENT \
--build-arg NEXT_PUBLIC_UMAMI_SITE_ID=$NEXT_PUBLIC_UMAMI_SITE_ID \
--build-arg NEXT_PUBLIC_ENVIRONMENT=$ENVIRONMENT \
--build-arg NEXT_PUBLIC_ORY_SDK_URL=$ORY_SDK_URL \
--build-arg NEXT_PUBLIC_RECAPTCHA_SITEKEY=${{ secrets.NEXT_PUBLIC_RECAPTCHA_SITEKEY }} \
-t "$ECR_REGISTRY"/"$IMAGE":"$GITHUB_SHA" .
docker tag "$ECR_REGISTRY"/"$IMAGE":"$GITHUB_SHA" "$ECR_REGISTRY"/"$IMAGE":latest
Expand Down Expand Up @@ -179,7 +179,7 @@ jobs:
sed -i "s%ORY_ACCESS_TOKEN_STUB%${{ env.ORY_ACCESS_TOKEN }}%g" deployment/app.yml
sed -i "s%NEW_RELIC_LICENSE_KEY_STUB%${{ env.NEW_RELIC_LICENSE_KEY }}%g" deployment/app.yml
sed -i "s%NEW_RELIC_APP_NAME_STUB%${{ env.NEW_RELIC_APP_NAME }}%g" deployment/app.yml
sed -i "s%NEXT_PUBLIC_ORYSDKURL_STUB%${{ env.NEXT_PUBLIC_ORY_SDK_URL }}%g" deployment/app.yml
sed -i "s%NEXT_PUBLIC_ORYSDKURL_STUB%${{ env.ORY_SDK_URL }}%g" deployment/app.yml

- name: Set deployment
run: |
Expand Down
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ FROM node:18.17.0-alpine AS package

ARG NEXT_PUBLIC_UMAMI_SITE_ID
ARG NEXT_PUBLIC_RECAPTCHA_SITEKEY
ARG NEXT_PUBLIC_ENVIRONMENT
ARG NEXT_PUBLIC_ORY_SDK_URL
ARG ENVIRONMENT
ENV PARCEL_WORKERS=1
ENV NEW_RELIC_NO_CONFIG_FILE=true
Expand Down Expand Up @@ -34,6 +36,8 @@ RUN apk add --no-cache git python3 make g++
RUN yarn install
RUN NEXT_PUBLIC_UMAMI_SITE_ID=$NEXT_PUBLIC_UMAMI_SITE_ID \
NEXT_PUBLIC_RECAPTCHA_SITEKEY=$NEXT_PUBLIC_RECAPTCHA_SITEKEY \
NEXT_PUBLIC_ENVIRONMENT=$NEXT_PUBLIC_ENVIRONMENT \
NEXT_PUBLIC_ORY_SDK_URL=$NEXT_PUBLIC_ORY_SDK_URL \
yarn build

FROM node:18.17.0-alpine
Expand Down
Loading