Trigger webhook on push to image registry?

How do I trigger a webhook on push to image registry?

I see that I can trigger a webhook on various repo events (such as a push: Webhooks | GitLab) but I need to trigger one when a (Docker) image is pushed to the container registry, so the deployment environment knows to pull the latest image.

I could Curl the webhook from the deploy stage of the .gitlab-ci.yml but I don’t know how long I need to wait between the push and the image being available; race conditions are no fun.

Any pointers on how to do this?


(GitLab 14.0 SaaS)