From add1c9385dd42ffd211295d49ec160b404738635 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EA=B5=90=ED=9C=98?= Date: Mon, 20 May 2024 15:32:10 +0900 Subject: [PATCH] fix: docker image name format --- .github/workflows/cogo_cicd_gradle.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cogo_cicd_gradle.yml b/.github/workflows/cogo_cicd_gradle.yml index 4c4c21a..a2bad4c 100644 --- a/.github/workflows/cogo_cicd_gradle.yml +++ b/.github/workflows/cogo_cicd_gradle.yml @@ -30,7 +30,7 @@ jobs: run: ./gradlew clean bootJar - name: Docker image build - run: docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/cogo_server . + run: docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/cogoServer . - name: Docker login uses: docker/login-action@v2 @@ -39,20 +39,20 @@ jobs: password: ${{ secrets.DOCKERHUB_PASSWORD }} - name: Docker Hub push - run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/cogo_server + run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/cogoServer run-docker-image-on-ec2: needs: build-docker-image runs-on: self-hosted steps: - name: Docker pull - run: sudo docker pull ${{ secrets.DOCKERHUB_USERNAME }}/cogo_server + run: sudo docker pull ${{ secrets.DOCKERHUB_USERNAME }}/cogoServer - name: Docker stop container run: sudo docker stop $(sudo docker ps -q) 2>/dev/null || true - name: Docker run new container - run: sudo docker run --name github-actions-demo --rm -d -p 8080:8080 ${{ secrets.DOCKERHUB_USERNAME }}/cogo-server + run: sudo docker run --name github-actions-demo --rm -d -p 8080:8080 ${{ secrets.DOCKERHUB_USERNAME }}/cogoServer - name: Delete old docker image run: sudo docker system prune -f