Skip to content

Commit

Permalink
fix: docker image name format
Browse files Browse the repository at this point in the history
  • Loading branch information
김교휘 authored and 김교휘 committed May 20, 2024
1 parent bd25a5f commit add1c93
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/cogo_cicd_gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit add1c93

Please sign in to comment.