Dependabot for hugo modules?

Hi,

I’m hosting my project on GitHub and run “hugo mod get -u && hugo mod tidy && hugo mod vendor” locally to include another GitHub repo (as a theme in this case).

I’m looking for a way to automate this workflow and let GitHub pull any new version of the second repo regularly. And I thought that’s what dependabot is for.

But dependabot does not support hugo modules, only go modules. Do you know of another way to accomplish this?

Thanks,
Georg

Write an action that runs hugo mod get -u ./... every x days. Then run hugo tidy. Then create a PR.

A good starting point is probably this action by @peaceiris

3 Likes

Thanks, looks like the way to go. @peaceiris actions are caching hugo modules in a temporary folder before a hugo build. I would like to permanently include them in the repo with hugo mod vendor so people without a golang environment can directly build the project. I don’t know much about github actions so far, maybe you could also point me in the right direction for that step?

Such an action would also be very helpful for theme mantainers including modules in their theme, I guess.

Such an action would also be very helpful for theme mantainers including modules in their theme, I guess.

I actually just run hugo mod get -u ./... && hugo mod tidy in my release script. That’s what patch releases are for :slight_smile:

Thanks for the tip, but I can’t follow. I sifted through the GitHub release management docs and found no step, where I could attach a shell script. What did I miss?

Alright, then I guess you are managing the releases with a script from home, @davidsneighbour At least that’s what I am gonna do now.

To write my own GitHub Actions based on the work from @peaceiris looks like the right way to automate this on GitHub and maybe I will look into this some other time.

Thanks again,
Georg

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.