Skip to content

Commit

Permalink
chore: CD 프로세스 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
ikjo39 authored Nov 28, 2024
1 parent d1d1744 commit 5b2dd56
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions .github/workflows/backend-prod-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,13 @@ jobs:
java-version: '17'
distribution: 'temurin'
cache: gradle

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

Expand All @@ -65,18 +71,28 @@ jobs:

- name: Build with Gradle (clean)
run: ./gradlew clean bootJar

# Docker 이미지 빌드
- name: Docker image build
run: docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/momo-api-prod .


# DockerHub 로그인
- name: Docker login
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

# Docker 이미지 빌드 & 푸시
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/momo-api-prod
platforms: |
linux/amd64
linux/arm64
- name: Docker image build
run: docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/momo-api-prod .

# Docker Hub 이미지 푸시
- name: Docker Hub push
run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/momo-api-prod
Expand Down

0 comments on commit 5b2dd56

Please sign in to comment.