Skip to content

Commit

Permalink
test: docker image 오류 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
ImGdevel committed Feb 3, 2025
1 parent 0440024 commit 26793bb
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/backend-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,20 @@ jobs:
run: |
./gradlew clean build -x test --no-daemon --parallel --configure-on-demand
- name: 빌드 파일 확인 (JAR 파일 존재 확인)
run: |
echo "빌드 파일 확인 중..."
ls -l backend/build/libs/
if [ ! -f backend/build/libs/*.jar ]; then
echo "JAR 파일이 존재하지 않습니다. 빌드가 실패했을 수 있습니다."
exit 1
else
echo "JAR 파일이 정상적으로 생성되었습니다."
fi
docker:
needs: build
if: github.ref == 'refs/heads/main'
#if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest

steps:
Expand All @@ -58,7 +69,7 @@ jobs:
run: |
echo "$DOCKER_HUB_PASSWORD" | docker login -u "$DOCKER_HUB_USERNAME" --password-stdin
# 최신 버전 태그 + latest 태그 동시 Push
# backend 폴더 내에서 Docker 빌드 진행
docker build -t $DOCKER_HUB_USERNAME/$REPOSITORY:$IMAGE_TAG ./backend
docker build -t $DOCKER_HUB_USERNAME/$REPOSITORY:latest ./backend
Expand Down

0 comments on commit 26793bb

Please sign in to comment.