Skip to content

Commit

Permalink
Release (#53)
Browse files Browse the repository at this point in the history
* Update icurri_deploy.yml

* Update icurri_deploy.yml

* Update icurri_deploy.yml

* Update icurri_deploy.yml

* Update icurri_deploy.yml
  • Loading branch information
genius00hwan authored Nov 23, 2024
1 parent 0701d5b commit 7876644
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/icurri_deploy.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: DOTFLOW_SERVER_DEPLOY
name: ICURRI_DEPLOY

on:
push:
branches: [ "release" ]
branches: [ "release" ]

jobs:
ci:
Expand Down Expand Up @@ -95,9 +95,15 @@ jobs:
username: ubuntu
key: ${{ secrets.RELEASE_SSH_KEY }}
script: |
sudo docker stop $(sudo docker ps -a -q) || true
sudo docker rm $(sudo docker ps -a -q) || true
# Stop and remove all containers except MongoDB
sudo docker ps -a -q --filter "name!=mongoDB" | xargs -r sudo docker stop || true
sudo docker ps -a -q --filter "name!=mongoDB" | xargs -r sudo docker rm || true
sudo docker images -q | xargs -r docker rmi || true
sudo docker system prune -af
aws ecr get-login-password --region ap-northeast-2 | sudo docker login --username AWS --password-stdin ${{ secrets.ECR_URI }} && sudo docker pull ${{ secrets.ECR_URI }}:${{ github.sha }}
# Docker login and pull new image from ECR
aws ecr get-login-password --region ap-northeast-2 | sudo docker login --username AWS --password-stdin ${{ secrets.ECR_URI }}
sudo docker pull ${{ secrets.ECR_URI }}:${{ github.sha }}

# Run the new container
sudo docker run --name dotflow-dev-repo -d -e SPRING_PROFILE=dev -e TZ=Asia/Seoul -e SERVER=true -p 8080:8080 ${{ secrets.ECR_URI }}:${{ github.sha }}

0 comments on commit 7876644

Please sign in to comment.