Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 2 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,32 @@ name: Build and Push to Docker Hub

on:
push:
branches:
- main
branches: [main]

jobs:
build-and-push:
runs-on: ubuntu-latest
environment: Pinhouse_env

steps:
# 1 소스 체크아웃
- name: Checkout code
uses: actions/checkout@v4

# ✅ 멀티플랫폼(arm64) 빌드용 에뮬레이터
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

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

# 3 Docker Hub 로그인
- name: Login to Docker Hub (Access Token)
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}

# 4 Frontend (Next.js) 이미지 빌드 & 푸시
- name: Build and push frontend image
uses: docker/build-push-action@v5
with:
context: .
file: ./Docker-pinhouse-file
push: true
# ✅ 핵심: 멀티 플랫폼 manifest 생성
platforms: linux/amd64,linux/arm64
platforms: linux/amd64
tags: |
${{ secrets.DOCKER_USERNAME }}/pinhouse:latest
${{ secrets.DOCKER_USERNAME }}/pinhouse:${{ github.sha }}
Expand Down