Skip to content

Commit

Permalink
cd: 도커 액션 사용해서 멀티플랫폼 이미지 빌드
Browse files Browse the repository at this point in the history
  • Loading branch information
jongmee committed Aug 11, 2024
1 parent 3fecd1b commit b0f0c4e
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,18 @@ jobs:
- name: Build with Gradle
run: ./gradlew bootJar

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build Docker Image And Push
run: |
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
docker build -t ${{ secrets.DOCKER_SERVER_IMAGE_NAME }} .
docker push ${{ secrets.DOCKER_SERVER_IMAGE_NAME }}
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ secrets.DOCKER_SERVER_IMAGE_NAME }}
platforms: |
linux/amd64
linux/arm64

0 comments on commit b0f0c4e

Please sign in to comment.