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 6, 2024
1 parent 453ec59 commit 6dea260
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ jobs:
echo "${{ secrets.EC2_SSH_PRIVATE_KEY }}" > private_key.pem
chmod 400 private_key.pem
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 }} &&
aws ecr get-login-password --region ap-northeast-2
sudo docker login --username AWS --password-stdin ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
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 }} &&
ID=$(sudo docker inspect -f '{{.Image}}' $(sudo docker ps -q -f name=${{ env.IMAGE_NAME }})) &&
echo "ID=$ID" >> $GITHUB_ENV &&
echo "miro2"
sudo docker stop ${{ env.IMAGE_NAME }}
sudo docker rm ${{ env.IMAGE_NAME }}
ID=$(sudo docker inspect -f '{{.Image}}' $(sudo docker ps -q -f name=${{ env.IMAGE_NAME }}))
echo "ID=$ID" >> $GITHUB_ENV
sudo docker rmi ${{ env.ID }}
fi &&
sudo docker image pull ${{ steps.meta.outputs.tags }} &&
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 6dea260

Please sign in to comment.