Skip to content

Commit

Permalink
[REVERT] 이전 커밋으로 롤백
Browse files Browse the repository at this point in the history
  • Loading branch information
mikekks committed Mar 19, 2024
1 parent 36b07fc commit 0c21790
Showing 1 changed file with 76 additions and 0 deletions.
76 changes: 76 additions & 0 deletions .github/workflows/dev-CD.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: DEV CD

on:
push:
branches: [ "develop" ]

jobs:
deploy-ci:
runs-on: ubuntu-22.04
env:
working-directory-spring: main
working-directory-nestjs: server

steps:
- name: checkout
uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '17'

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '18'

- name: Install dependencies (npm 의존성 설치)
run: npm install
working-directory: ${{ env.working-directory-nestjs }}

- name: resources 폴더 내 application-secret.properties 파일 생성
run: |
mkdir -p src/main/resources
echo "${{ secrets.APPLICATION_SECRET }}" > src/main/resources/application-secret.properties
working-directory: ${{ env.working-directory-spring }}

- name: nestjs 폴더 내 .dev.env 파일 생성
run: |
echo "${{ secrets.APPLICATION_SECRET }}" > .dev.env
working-directory: ${{ env.working-directory-nestjs }}

- name: Build (Spring)
run: |
chmod +x gradlew
./gradlew clean build
working-directory: ${{ env.working-directory-spring }}
shell: bash

- name: Build (nestjs)
run: npm run build
working-directory: ${{ env.working-directory-nestjs }}

### 여기까지 CI와 거의 동일

- name: docker build 가능하도록 환경 설정
uses: docker/setup-buildx-action@v2

- name: docker hub에 로그인
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_LOGIN_USERNAME }}
password: ${{ secrets.DOCKERHUB_LOGIN_ACCESSTOKEN }}

- name: docker image 빌드 및 푸시 (Spring)
run: |
docker build --platform linux/amd64 -t makerscrew/main .
docker push makerscrew/main
working-directory: ${{ env.working-directory-spring }}

- name: docker image 빌드 및 푸시 (nestjs)
run: |
docker build --platform linux/amd64 -t makerscrew/server .
docker push makerscrew/server
working-directory: ${{ env.working-directory-nestjs }}

0 comments on commit 0c21790

Please sign in to comment.