Skip to content

Commit 43f5701

Browse files
committed
cicd: 도커 빌드및 푸시 자동화 설정 추가
- CI workflow에 도커 빌드와 Push 명령 추가 - 빌드 테스트 진행후 통과된다면 이미지를 도커허브에 추가
1 parent 2a8f91c commit 43f5701

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

.github/workflows/CI.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,9 @@ jobs:
7474
})
7575
7676
77-
- name: Build and analyze
78-
env:
79-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
80-
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
81-
run: ./gradlew build sonar --info
77+
- name: 도커 빌드및 Push
78+
run: |
79+
echo "${{ secrets.DOCKER_HUB_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_HUB_USERNAME }}" --password-stdin
80+
docker build -t 7zrv/somemore:${GITHUB_SHA::7} -t 7zrv/somemore:latest .
81+
docker push 7zrv/somemore:${GITHUB_SHA::7}
82+
docker push 7zrv/somemore:latest

0 commit comments

Comments
 (0)