Trigger Pipeline build on DockerHub change

my question is if I can monitor DockerHub Changes and trigger a build operation.

Explanation: I am using Watchtower which is really great, to update docker containers. But it is not able to build containers using Dockerfiles so I thought I could automate a build using GitLabs Pipelines.
But I don’t want the image to build every day, then I can just build it locally as I do right now with a cron job.
I want to build it only if my base Image updates. For example Nextcloud or Homeassistant…

Is there a way to set that up in Gitlab?
I have found information about how to set that up in GitHub:

Also found this but it doesn’t help since it’s only for local changes…

Thanks for any help in advance!

1 Like