Skip to content

Commit

Permalink
Update gradle.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
dlrjs2360 authored Dec 9, 2023
1 parent 9508b62 commit 91330af
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,8 @@ jobs:
- name: Docekr Build
run: |
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
docker build -t app .
docker tag app ${{ secrets.DOCKER_USERNAME }}/hbc:latest
docker push ${{ secrets.DOCKER_USERNAME }}/hbc:latest
docker build -t ${{ secrets.DOCKER_USERNAME }}/hbc .
docker push ${{ secrets.DOCKER_USERNAME }}/hbc
# 도커 컨테이너 변경
- name: Deploy
Expand All @@ -75,12 +74,10 @@ jobs:
username: ec2-user
key: ${{ secrets.PRIVATE_KEY }} # pem 키
script: |
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
docker rmi ${{ secrets.USERNAME }}/hbc
docker pull ${{ secrets.USERNAME }}/hbc:latest
sudo docker rm $(docker ps -a -q)
sudo docker pull ${{ secrets.USERNAME }}/hbc
docker-compose up -d
docker image prune -a -f
sudo docker image prune -f

0 comments on commit 91330af

Please sign in to comment.