CI/CD integration

I m using portainer to deploy a docker stack in my server, i would like to use Circle CI that will ssh to my server and run bash script

docker pull image_name && docker service update --force service_name

But the container is not updated to latest image. Portainer always use an image like this “mysql:” (tag ) instead of latest one when i update service.
How can i do. what is correct way to integrate with CI
Thanks.