How do I make a Gitlab badge for a scheduled nightly build?

I have added the example pipeline status badge to our project, but I assume that just shows the status of the most recent pipeline run.

How can I make a separate badge for just a scheduled nightly build?

Good question! If your schedule runs on a special branch, then you can use that:

[![pipeline status](https://gitlab.com/beautifulcanoe/GROUP/REPO/badges/SCHEDULE_BRANCH/pipeline.svg)](https://gitlab.com/GROUP/REPO/-/commits/SCHEDULE_BRANCH)

if the schedule runs on a branch you use for other things, then this issue suggests that you probably can’t easily create a badge. Presumably you could use some other badge service and the API, but it sounds awkward.

:frowning:

Thanks for the quick response. It is the same master branch in both cases. Hmm

I created an alias for my branch using git symbolic-ref refs/heads/main refs/heads/master but sadly “main” did not appear in the dropdown list for branches in the schedule ui

I have the same issue., were you able to figure this out? If so., how to add badges for various scheduled nightly builds?

Until GitLab provides badge support for scheduled pipelines, I’ve made a tool that can serve this capability:

Unfortunately, this requires hosting the tool and setting it up for the GitLab instance(s) you want to host badge support for. It is primarily designed to help support self-hosted environments/teams.