Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
 into feat/schedule-detail-page

; Conflicts:
;	src/mock/browser.ts
;	src/shared/styles/globals.css
;	src/shared/utils/index.ts
;	tsconfig.json
  • Loading branch information
pepperdad committed Dec 8, 2023
2 parents ab3fcf8 + f6f2981 commit df223ac
Show file tree
Hide file tree
Showing 137 changed files with 5,029 additions and 185 deletions.
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
name: Check Errors

on:
pull_request:
branches: [ "develop", "main" ]
workflow_call:

jobs:
err_check:
name: Check Errors
# runs-on: self-hosted
runs-on: ubuntu-latest
runs-on: self-hosted

steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Set Node.js 16.x
uses: actions/setup-node@v3
- name: Set Node.js 18.18
uses: actions/setup-node@v4
with:
node-version: 18.18
node-version: 18.18

- name: Setup yarn
run: npm install -g yarn
Expand All @@ -35,4 +32,4 @@ jobs:
run: yarn lint

- name: Check tsc-project
run: yarn tsc-project
run: yarn tsc-project
2 changes: 1 addition & 1 deletion .github/workflows/cr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ permissions:

jobs:
code_review:
runs-on: ubuntu-latest
runs-on: self-hosted
steps:
- uses: anc95/ChatGPT-CodeReview@main
env:
Expand Down
40 changes: 19 additions & 21 deletions .github/workflows/front.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
name: CI/CD nextjs
name: Build Nextjs

on:
push:
branches: [ "develop", "main" ]

env:
ECR_URL: ${{ secrets.ECR_REPO_DEV_FRONT }}
ROLE_ARN: ${{ secrets.OIDC_ROLE }}
AWS_REGION: ${{ secrets.AWS_REGION }}
WEBHOOK_URL: ${{ secrets.WEBHOOK }}
workflow_call:
secrets:
ECR_REPO_DEV_FRONT:
OIDC_ROLE:
AWS_REGION:
WEBHOOK:
AWS_DEPLOY_APP_NAME:
AWS_DEPLOY_GROUP:
AWS_DEPLOY_CONFIG:

permissions:
id-token: write
contents: read

jobs:
call_err_check:
name: Call workflow Error Check
uses: ./.github/workflows/check_errors.yml
jobs:
build:
name: To push ECR
runs-on: self-hosted
Expand All @@ -31,11 +29,11 @@ jobs:
run: docker build -t catcher-web .

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: ${{ env.AWS_REGION }}
aws-region: ${{ secrets.AWS_REGION }}
role-session-name: GitHubActions
role-to-assume: ${{ env.ROLE_ARN }}
role-to-assume: ${{ secrets.OIDC_ROLE }}

- name: Login to Amazon ECR
id: login-ecr
Expand All @@ -45,23 +43,23 @@ jobs:
run: |
# ECR Front 레포의 기존 이미지 조회
aws ecr describe-images \
--repository-name ${{ secrets.AWS_FRONT_ECR_NAME }} \
--repository-name ${{ secrets.ECR_REPO_DEV_FRONT }} \
--region ${{ secrets.AWS_REGION }} \
--output yaml | grep imageDigest | awk -F ' ' '{print $2}' > ./delete_list.txt
# ECR Front 레포의 기존 이미지 모두 삭제
for front_image in `cat ./delete_list.txt`
do
aws ecr batch-delete-image \
--repository-name ${{ secrets.AWS_FRONT_ECR_NAME }} \
--repository-name ${{ secrets.ECR_REPO_DEV_FRONT }} \
--image-ids imageDigest=$front_image \
--output yaml > /dev/null
done
- name: Publish Image to ECR(CATCHER-WEB)
run: |
docker tag catcher-web:latest ${{ env.ECR_URL }}:${{ github.sha }}
docker push ${{ env.ECR_URL }}:${{ github.sha }}
docker tag catcher-web:latest ${{ secrets.ECR_REPO_DEV_FRONT }}:${{ github.sha }}
docker push ${{ secrets.ECR_REPO_DEV_FRONT }}:${{ github.sha }}
- name: Deploy to Frontend Instance from ECR Image
run: |
Expand All @@ -79,4 +77,4 @@ jobs:
else
MESSAGE="❌ ${{ job.status }} 프론트 배포 실패 : catcher-web - by ${{ github.actor }}"
fi
curl -X POST -H "Content-Type: application/json" --data "{\"text\":\"${MESSAGE}\"}" ${{ env.WEBHOOK_URL }}
curl -X POST -H "Content-Type: application/json" --data "{\"text\":\"${MESSAGE}\"}" ${{ secrets.WEBHOOK }}
46 changes: 46 additions & 0 deletions .github/workflows/on_pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: ON PR/Merge - Check Errors | Build

on:
pull_request:
branches: [ "develop", "main" ]
types: [ "opened", "closed" ]
push:
branches: [ "develop", "main" ]

jobs:
merged:
if: ${{ github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true }}
name: Build Nextjs
uses: ./.github/workflows/front.yml
secrets:
ECR_REPO_DEV_FRONT: ${{ secrets.ECR_REPO_DEV_FRONT }}
OIDC_ROLE: ${{ secrets.OIDC_ROLE }}
AWS_REGION: ${{ secrets.AWS_REGION }}
WEBHOOK: ${{ secrets.WEBHOOK }}
AWS_DEPLOY_APP_NAME: ${{ secrets.AWS_DEPLOY_APP_NAME }}
AWS_DEPLOY_GROUP: ${{ secrets.AWS_DEPLOY_GROUP }}
AWS_DEPLOY_CONFIG: ${{ secrets.AWS_DEPLOY_CONFIG }}

pr:
if: ${{ github.event.pull_request.merged == false && github.event != 'push'}}
name: Error Check
uses: ./.github/workflows/check_err.yml

pushed-1:
if: ${{ github.event.pull_request.merged == false && github.event == 'push'}}
name: Error Check
uses: ./.github/workflows/check_err.yml

pushed-2:
if: ${{ github.event.pull_request.merged == false && github.event == 'push'}}
name: Build Nextjs
uses: ./.github/workflows/front.yml
secrets:
ECR_REPO_DEV_FRONT: ${{ secrets.ECR_REPO_DEV_FRONT }}
OIDC_ROLE: ${{ secrets.OIDC_ROLE }}
AWS_REGION: ${{ secrets.AWS_REGION }}
WEBHOOK: ${{ secrets.WEBHOOK }}
AWS_DEPLOY_APP_NAME: ${{ secrets.AWS_DEPLOY_APP_NAME }}
AWS_DEPLOY_GROUP: ${{ secrets.AWS_DEPLOY_GROUP }}
AWS_DEPLOY_CONFIG: ${{ secrets.AWS_DEPLOY_CONFIG }}
needs: pushed-1
17 changes: 5 additions & 12 deletions .pnp.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Binary file not shown.
Binary file not shown.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,17 @@ This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next

```shell
# zero install을 위한 세팅을 해놓았으나, 만약 정상적으로 실행이 안될경우 install 진행할것.
yarn
yarn

yarn dev
```
```

## 기술 스택

<img src="https://img.shields.io/badge/nextjs-000000?style=for-the-badge&logo=nextdotjs&logoColor=white">
<img src="https://img.shields.io/badge/typescript-3178C6?style=for-the-badge&logo=typescript&logoColor=white">
<img src="https://img.shields.io/badge/tailwindcss-06B6D4?style=for-the-badge&logo=tailwindcss&logoColor=white">
<img src="https://img.shields.io/badge/recoil-3578E5?style=for-the-badge&logo=recoil&logoColor=white">
<img src="https://img.shields.io/badge/reactquery-FF4154?style=for-the-badge&logo=reactquery&logoColor=white">
<img src="https://img.shields.io/badge/storybook-FF4785?style=for-the-badge&logo=storybook&logoColor=white">
<br>
2 changes: 1 addition & 1 deletion pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ function MyApp({ Component, pageProps }: AppProps) {
<RecoilRoot>
<Header />
<Component {...pageProps} />
<Modal />
<Alert />
<Confirm />
<Modal />
</RecoilRoot>
);
}
Expand Down
Loading

0 comments on commit df223ac

Please sign in to comment.