변경 사항에 대한 설명적인 커밋 메시지 #3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Docker 배포 | ||
| on: | ||
| push: | ||
| branches: | ||
| - minseonjae # 트리거할 브랜치 (예: main) | ||
| pull_request: | ||
| branches: | ||
| - minseonjae # Pull Request를 트리거할 브랜치 (예: main11) | ||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: 코드 체크아웃 | ||
| uses: actions/checkout@v4 | ||
| - name: Node.js 설정 | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '18.x' # Node.js 버전 | ||
| - name: 의존성 패키지 설치 | ||
| run: npm install | ||
| - name: Next.js 앱 빌드 | ||
| run: npm run build | ||
| - name: Docker Buildx 설치 | ||
| id: buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
| - name: Docker Hub 로그인 | ||
| uses: docker/login-action@v2 | ||
| with: | ||
| username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
| password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
| - name: Docker 이미지 빌드 및 푸시 | ||
| id: docker_build_push | ||
| uses: docker/build-push-action@v4 | ||
| with: | ||
| push: true | ||
| tags: ${{ secrets.DOCKERHUB_USERNAME }}/final-project-app:${{ github.sha }} # 저장소 이름 변경 필요 | ||
| build-args: | ||
| NODE_ENV: production | ||
|
Check failure on line 46 in .github/workflows/deploy.yml
|
||
| cache-from: type=gha | ||
| cache-to: type=gha,mode=max | ||
| - name: 이미지 상세 정보 | ||
| run: | | ||
| echo "이미지 다이제스트: ${{ steps.docker_build_push.outputs.digest }}" | ||
| echo "이미지 태그: ${{ steps.docker_build_push.outputs.tags }}" | ||