From ba001d5650563ae18e570cee9b2dd775a5c0937d Mon Sep 17 00:00:00 2001 From: Sangho Han <113084292+bbbang105@users.noreply.github.com> Date: Sun, 26 May 2024 14:36:03 +0900 Subject: [PATCH] Update backend.yml --- .github/workflows/backend.yml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/backend.yml b/.github/workflows/backend.yml index f672944..8148cf1 100644 --- a/.github/workflows/backend.yml +++ b/.github/workflows/backend.yml @@ -39,24 +39,22 @@ jobs: ${{ runner.os }}-gradle- - name: ๐Ÿฆ‰ gradle build๋ฅผ ์œ„ํ•œ ๊ถŒํ•œ์„ ๋ถ€์—ฌํ•ฉ๋‹ˆ๋‹ค. - run: | - cd backend - chmod +x gradlew + run: sudo chmod +x backend/gradlew - name: ๐Ÿฆ‰ gradle wrapper๋ฅผ ํ†ตํ•œ Gradle ๋ฒ„์ „ ์ง€์ • run: | cd backend - ./gradlew wrapper --gradle-version 8.7 + sudo ./gradlew wrapper --gradle-version 8.7 - name: ๐Ÿฆ‰ gradle ์บ์‹œ ์‚ญ์ œ run: | cd backend - ./gradlew clean + sudo ./gradlew clean - name: ๐Ÿฆ‰ gradle build ์ค‘์ž…๋‹ˆ๋‹ค. run: | cd backend - ./gradlew build -x test --stacktrace + sudo ./gradlew build -x test --stacktrace - name: ๐Ÿฆ‰ Docker Hub์— ๋กœ๊ทธ์ธ ํ›„, docker image build ํ›„ Docker Hub์— pushํ•ฉ๋‹ˆ๋‹ค. env: @@ -65,6 +63,6 @@ jobs: DOCKERHUB_REPOSITORY: ${{ secrets.DOCKERHUB_REPOSITORY }} run: | cd backend - docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWORD - docker build -t $DOCKERHUB_USERNAME/$DOCKERHUB_REPOSITORY:latest . - docker push $DOCKERHUB_USERNAME/$DOCKERHUB_REPOSITORY:latest + sudo docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWORD + sudo docker build -t $DOCKERHUB_USERNAME/$DOCKERHUB_REPOSITORY:latest . + sudo docker push $DOCKERHUB_USERNAME/$DOCKERHUB_REPOSITORY:latest