Skip to content

Commit

Permalink
feat: test
Browse files Browse the repository at this point in the history
  • Loading branch information
miro-ring committed Jan 4, 2024
1 parent 73af959 commit af30a78
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,11 @@ jobs:
ssh -i private_key.pem -o StrictHostKeyChecking=no ubuntu@${{ secrets.EC2_PUBLIC_DOMAIN }} "
aws ecr get-login-password --region ap-northeast-2 |
sudo docker login --username AWS --password-stdin ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} &&
ContainerId=$(sudo docker ps -q -f name=${{ env.IMAGE_NAME }}) &&
ImageId=$(sudo docker inspect -f '{{.Image}}' $containerId) &&
echo "miro" &&
echo "$(sudo docker ps -q -f name=${{ env.IMAGE_NAME }})" &&
echo "$(sudo docker inspect -f '{{.Image}}' $containerId)" &&
echo $ContainerId &&
echo $ImageId &&
if [ $ContainerId ]; then
if [ \$(sudo docker ps -q -f name=${{ env.IMAGE_NAME }}) ]; then
echo "miro2" &&
sudo docker stop ${{ env.IMAGE_NAME }} &&
sudo docker rm ${{ env.IMAGE_NAME }} &&
sudo docker rmi $imageId
sudo docker rmi $(sudo docker inspect -f '{{.Image}}' $(sudo docker ps -q -f name=${{ env.IMAGE_NAME }}))
fi &&
sudo docker image pull ${{ steps.meta.outputs.tags }} &&
sudo docker container run --name ${{ env.IMAGE_NAME }} -d -p 3000:3000 ${{ steps.meta.outputs.tags }}"

0 comments on commit af30a78

Please sign in to comment.