Skip to content

Commit

Permalink
Merge pull request #189 from isd-sgcu/dev
Browse files Browse the repository at this point in the history
add missing envs
  • Loading branch information
bookpanda authored Jul 28, 2024
2 parents 507b57c + ee13e80 commit 0085d16
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 9 deletions.
1 change: 0 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ NEXT_PUBLIC_RUP_PEUN_DATE= 2024-07-20
NEXT_PUBLIC_RPKM_DAY_1= 2025-08-03
NEXT_PUBLIC_RPKM_DAY_2= 2025-08-04
NEXT_PUBLIC_FRESHY_NIGHT= 2025-08-04T16:00:00.000Z
BASE_DOMAIN_IMAGES=
APP_ENV=
16 changes: 12 additions & 4 deletions .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,14 @@ jobs:
build-args: |
APP_ENV=development
API_BASE_URL=${{ vars.DEV_API_BASE_URL }}
BAAN_ANNOUCE_DATE=${{ vars.DEV_BAAN_ANNOUCE_DATE }}
CLOSED_BAAN_SELECTION_DATE=${{ vars.DEV_CLOSED_BAAN_SELECTION_DATE }}
FIRST_DATE_DATE=${{ vars.DEV_FIRST_DATE_DATE }}
FRESHY_NIGHT_DATE=${{ vars.DEV_FRESHY_NIGHT_DATE }}
FRESHY_NIGHT_EVENT=${{ vars.DEV_FRESHY_NIGHT_EVENT }}
RPKM_DAY_1=${{ vars.DEV_RPKM_DAY_1 }}
RPKM_DAY_2=${{ vars.DEV_RPKM_DAY_2 }}
RUP_PEUN_DATE=${{ vars.DEV_RUP_PEUN_DATE }}
BASE_DOMAIN_IMAGES=${{ vars.DEV_BASE_DOMAIN_IMAGES }}
BAAN_ANNOUCE_DATE=${{ vars.DEV_BAAN_ANNOUCE_DATE }}
- name: Build and Push Docker Image (PROD)
uses: docker/build-push-action@v3
Expand All @@ -83,10 +87,14 @@ jobs:
build-args: |
APP_ENV=production
API_BASE_URL=${{ vars.PROD_API_BASE_URL }}
BAAN_ANNOUCE_DATE=${{ vars.PROD_BAAN_ANNOUCE_DATE }}
CLOSED_BAAN_SELECTION_DATE=${{ vars.PROD_CLOSED_BAAN_SELECTION_DATE }}
FIRST_DATE_DATE=${{ vars.PROD_FIRST_DATE_DATE }}
FRESHY_NIGHT_DATE=${{ vars.PROD_FRESHY_NIGHT_DATE }}
FRESHY_NIGHT_EVENT=${{ vars.PROD_FRESHY_NIGHT_EVENT }}
RPKM_DAY_1=${{ vars.PROD_RPKM_DAY_1 }}
RPKM_DAY_2=${{ vars.PROD_RPKM_DAY_2 }}
RUP_PEUN_DATE=${{ vars.PROD_RUP_PEUN_DATE }}
BASE_DOMAIN_IMAGES=${{ vars.PROD_BASE_DOMAIN_IMAGES }}
BAAN_ANNOUCE_DATE=${{ vars.PROD_BAAN_ANNOUCE_DATE }}
send_message_dev:
needs: build
uses: ./.github/workflows/send-message.yml
Expand Down
21 changes: 18 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,30 @@ ENV APP_ENV=${APP_ENV}
ARG API_BASE_URL
ENV API_BASE_URL=${API_BASE_URL}

ARG BAAN_ANNOUCE_DATE
ENV BAAN_ANNOUCE_DATE=${BAAN_ANNOUCE_DATE}

ARG CLOSED_BAAN_SELECTION_DATE
ENV CLOSED_BAAN_SELECTION_DATE=${CLOSED_BAAN_SELECTION_DATE}

ARG FIRST_DATE_DATE
ENV FIRST_DATE_DATE=${FIRST_DATE_DATE}

ARG FRESHY_NIGHT_DATE
ENV FRESHY_NIGHT_DATE=${FRESHY_NIGHT_DATE}

ARG FRESHY_NIGHT_EVENT
ENV FRESHY_NIGHT_EVENT=${FRESHY_NIGHT_EVENT}

ARG RPKM_DAY_1
ENV RPKM_DAY_1=${RPKM_DAY_1}

ARG RPKM_DAY_2
ENV RPKM_DAY_2=${RPKM_DAY_2}

ARG RUP_PEUN_DATE
ENV RUP_PEUN_DATE=${RUP_PEUN_DATE}

ARG BAAN_ANNOUCE_DATE
ENV BAAN_ANNOUCE_DATE=${BAAN_ANNOUCE_DATE}

COPY package.json pnpm-lock.yaml ./
RUN pnpm install

Expand Down
8 changes: 7 additions & 1 deletion next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,15 @@ const nextConfig = {
},
env: {
NEXT_PUBLIC_API_BASE_URL: process.env.API_BASE_URL,
NEXT_PUBLIC_BAAN_ANNOUCE_DATE: process.env.BAAN_ANNOUCE_DATE,
NEXT_PUBLIC_CLOSED_BAAN_SELECTION_DATE:
process.env.CLOSED_BAAN_SELECTION_DATE,
NEXT_PUBLIC_FIRST_DATE_DATE: process.env.FIRST_DATE_DATE,
NEXT_PUBLIC_FRESHY_NIGHT_DATE: process.env.FRESHY_NIGHT_DATE,
NEXT_PUBLIC_FRESHY_NIGHT_EVENT: process.env.FRESHY_NIGHT_EVENT,
NEXT_PUBLIC_RPKM_DAY_1: process.env.RPKM_DAY_1,
NEXT_PUBLIC_RPKM_DAY_2: process.env.RPKM_DAY_2,
NEXT_PUBLIC_RUP_PEUN_DATE: process.env.RUP_PEUN_DATE,
NEXT_PUBLIC_BAAN_ANNOUCE_DATE: process.env.BAAN_ANNOUCE_DATE,
},
};

Expand Down

0 comments on commit 0085d16

Please sign in to comment.