Run same workflow on all branches

I have a workflow that checks for new commits in a branch each day, and tags it if there were any. It’s triggered at midnight UTC:

on:
  schedule:
  - cron: "0 0 * * *"

Currently, it only runs on the default branch. Is there any way to make it run on all branches, without hard-coding branch names in the workflow file?

You are correct that scheduled workflows run on the latest commit on the default or base branch – sorry about that!

We really appreciate feedback on how we can make GitHub even better and the best way to report any feature requests is directly to us through our feedback form: https://support.github.com/contact/feedback

Our roadmap is not publicly visible, so we recommend that you keep an eye on the GitHub Blog for the latest announcements about new features.

There is another topic where other GitHub users have been discussing workarounds:

1 Like