I trigger a build of a specific branch every hour through crontab. This works fine, but I would like the build to be triggered only if there is a new commit on the branch since the last build.
At present I’m looking at querying the Gitlab API and Gitlab-CI API and may be set a more specific value for the “ref” option of the Trigger API according to what I’ve queried. Is this a way to do it ? Or is there another (simpler) to achieve this ?
I’m a bit lost, so thanks for any advice you could give me.