Self-hosted Forgejo Releases (the Final Boss)

So I made a thing and then I blogged a whole thing about updating the thing via GitHub releases. Then GitHub went too far and I scarpered to a self-hosted Forgejo instance. I got web deployment actions working but I saved the release action for another day. The Day That day is today! […]


This content originally appeared on dbushell.com (blog) and was authored by dbushell.com (blog)

So I made a thing and then I blogged a whole thing about updating the thing via GitHub releases. Then GitHub went too far and I scarpered to a self-hosted Forgejo instance. I got web deployment actions working but I saved the release action for another day.

The Day

That day is today! First I fixed the action cache on my runner. This allows actions to save build tools locally and not redownload them every run.

Then I pondered the main task.

My ZSH prompt can update itself with an update command.

zsp update

The command checks the local version against the latest GitHub release (v0.8) via the API. The Forgejo API is practically identical to GitHub for my purposes so that’s a blessing. I could swap repos by updating the API URL in my code to my Forgejo instance and then:

  1. Release v0.9 on GitHub
  2. Bump the version to v0.10
  3. Release v0.10 on Forgejo

Then I’d run zsp update twice to first fast-forward to the latest on GitHub (v0.9) from older versions, and then to the Forgejo release (v0.10) on the second command.

Forgejo Release Action

The plan was sound. I updated my action workflow. I simplified it by removing the upload-artifact step. The forgejo-release allows me to just upload the build directory. (Maybe I didn’t need artifacts on GitHub either… whatever!)

Everything was going so well until a little hiccup.

the Forgejo action tab showing many failed releases

At least I got the cache working to fail faster.

The release action failed regardless of what variables I tweaked. I stumbled upon the Forgejo issue tracker. I found a two week old bug report worryingly similar to my issue.

On the 13th failed attempt — at this point I’d gone insane just rerunning the same config without change — I discovered the actual error.

Error: token does not have at least one of required scope(s): [read:user]

In my defence, this error was not where it should have been.

I left a comment on the Forgejo issue just in case. I generated a new API token with the correct permissions; v0.10 was released!

I ran zsp update twice on the machines where I use my little ZSH prompt. I bet you’re thinking it failed to update? Shame on you! It worked perfectly. I seamlessly migrated between versions on macOS, and both Linux ARM and x86 machines.


I haven’t added any new features to my prompt since I built it back in March. I’m waiting for Zig to stabilise before I jump back in. Zig is cool but I don’t have time to keep up with breaking changes. Sounds like Zig 1.0 is within sight?


This content originally appeared on dbushell.com (blog) and was authored by dbushell.com (blog)


Print Share Comment Cite Upload Translate Updates
APA

dbushell.com (blog) | Sciencx (2025-08-25T10:00:00+00:00) Self-hosted Forgejo Releases (the Final Boss). Retrieved from https://www.scien.cx/2025/08/25/self-hosted-forgejo-releases-the-final-boss/

MLA
" » Self-hosted Forgejo Releases (the Final Boss)." dbushell.com (blog) | Sciencx - Monday August 25, 2025, https://www.scien.cx/2025/08/25/self-hosted-forgejo-releases-the-final-boss/
HARVARD
dbushell.com (blog) | Sciencx Monday August 25, 2025 » Self-hosted Forgejo Releases (the Final Boss)., viewed ,<https://www.scien.cx/2025/08/25/self-hosted-forgejo-releases-the-final-boss/>
VANCOUVER
dbushell.com (blog) | Sciencx - » Self-hosted Forgejo Releases (the Final Boss). [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/08/25/self-hosted-forgejo-releases-the-final-boss/
CHICAGO
" » Self-hosted Forgejo Releases (the Final Boss)." dbushell.com (blog) | Sciencx - Accessed . https://www.scien.cx/2025/08/25/self-hosted-forgejo-releases-the-final-boss/
IEEE
" » Self-hosted Forgejo Releases (the Final Boss)." dbushell.com (blog) | Sciencx [Online]. Available: https://www.scien.cx/2025/08/25/self-hosted-forgejo-releases-the-final-boss/. [Accessed: ]
rf:citation
» Self-hosted Forgejo Releases (the Final Boss) | dbushell.com (blog) | Sciencx | https://www.scien.cx/2025/08/25/self-hosted-forgejo-releases-the-final-boss/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.