From a0e127f25d13eb6777ff5dff4b6c134e01a29603 Mon Sep 17 00:00:00 2001 From: hanni <102026726+hysong4u@users.noreply.github.com> Date: Wed, 21 Aug 2024 03:50:56 +0900 Subject: [PATCH 1/2] Update main.yml --- .github/workflows/main.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b5f9a32..4a93dda 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,23 +20,23 @@ jobs: - name: Grant execute permission for gradlew run: chmod +x gradlew - # gradlew 파일에 실행 권한 부여 - name: Create application.yml from secret run: | mkdir -p src/main/resources echo "${{ secrets.APPLICATION_YML }}" > src/main/resources/application.yml - # GitHub Secrets에서 가져온 내용을 application.yml 파일로 생성 - name: Build with Gradle run: ./gradlew clean build -x test - - name: Docker build + - name: Docker login + run: echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login -u "${{ secrets.DOCKERHUB_USERNAME }}" --password-stdin + + - name: Docker build and push run: | - echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin - docker build -t COM-US-SERVER . - docker tag COM-US-SERVER hysong4u/COM-US-SERVER:latest - docker push hysong4u/COM-US-SERVER:latest + docker build -t com-us-server . + docker tag com-us-server hysong4u/com-us-server:latest + docker push hysong4u/com-us-server:latest - name: Get timestamp uses: gerred/actions/current-time@master From 4d73fc60cf3e17f63efdf82fd6ab8fc11e7477d2 Mon Sep 17 00:00:00 2001 From: hanni <102026726+hysong4u@users.noreply.github.com> Date: Wed, 21 Aug 2024 03:55:02 +0900 Subject: [PATCH 2/2] Update main.yml --- .github/workflows/main.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4a93dda..525044b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,7 +32,10 @@ jobs: - name: Docker login run: echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login -u "${{ secrets.DOCKERHUB_USERNAME }}" --password-stdin - - name: Docker build and push + - name: List files + run: ls -la + + - name: Docker build run: | docker build -t com-us-server . docker tag com-us-server hysong4u/com-us-server:latest