Skip to content

Commit

Permalink
Merge branch 'dev' into dong-freshynight-something
Browse files Browse the repository at this point in the history
  • Loading branch information
D33102 authored Jul 28, 2024
2 parents fb13523 + 48ec299 commit 904e0ad
Show file tree
Hide file tree
Showing 51 changed files with 2,029 additions and 187 deletions.
4 changes: 3 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
NEXT_PUBLIC_API_BASE_URL=
NEXT_PUBLIC_FIRST_DATE_DATE= 2024-07-21
NEXT_PUBLIC_RUP_PEUN_DATE= 2024-07-20
BASE_DOMAIN_IMAGES=
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
APP_ENV=
27 changes: 25 additions & 2 deletions .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +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 }}
- name: Build and Push Docker Image (PROD)
uses: docker/build-push-action@v3
Expand All @@ -82,9 +87,27 @@ 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 }}
send_message_dev:
needs: build
uses: ./.github/workflows/send-message.yml
secrets: inherit
with:
IMAGE_TAG: ${{ needs.build.outputs.IMAGE_TAG_DEV }}
send_message_prod:
if: github.ref == 'refs/heads/main'
needs: build
uses: ./.github/workflows/send-message.yml
secrets: inherit
with:
IMAGE_TAG: ${{ needs.build.outputs.IMAGE_TAG_PROD }}

cd:
name: Continuous Deployment
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/send-message.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Send Messages

on:
workflow_call:
inputs:
IMAGE_TAG:
required: true
type: string

jobs:
send_message:
runs-on: ubuntu-latest

steps:
- name: Send message to Discord
run: |
curl -X POST -H "Content-Type: application/json" \
-H "Authorization: Bot ${{ secrets.RPKM67_DISCORD_API_KEY }}" \
-d "{
\"content\": \"A new push has been made to the **${{ github.event.pull_request.base.ref }}** branch by ${{ github.actor }}!\",
\"embeds\": [
{
\"author\": {
\"name\": \"${{ github.actor }}\",
\"icon_url\": \"https://github.com/${{ github.actor }}.png\"
},
\"description\": \"**Service Name:** ${{ github.repository }}\n\n**Version:**\n${{ inputs.IMAGE_TAG }}\n\n**Details:**\n${{ github.event.pull_request.title || github.event.head_commit.message }}\",
\"color\": 5814783
}
]
}" \
${{ secrets.RPKM67_DISCORD_WEBHOOK_URL }}
18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,27 @@ 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}

Expand Down
7 changes: 7 additions & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,14 @@ 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,
},
};
Expand Down
3 changes: 3 additions & 0 deletions public/LineIcon-white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/LineIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions public/baan.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/cross-white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/line-white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 904e0ad

Please sign in to comment.