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