mirror of
https://github.com/go-gitea/gitea.git
synced 2026-03-12 02:24:21 -05:00
Auto updates for Gitea #175
Closed
opened 2025-11-02 03:12:17 -06:00 by GiteaMirror
·
18 comments
No Branch/Tag Specified
main
release/v1.25
release/v1.24
release/v1.23
release/v1.22
release/v1.21
release/v1.20
release/v1.19
release/v1.18
release/v1.17
release/v1.16
release/v1.15
release/v1.14
release/v1.13
release/v1.12
release/v1.11
release/v1.10
release/v1.9
release/v1.8
v1.25.3
v1.25.2
v1.25.1
v1.25.0
v1.24.7
v1.25.0-rc0
v1.26.0-dev
v1.24.6
v1.24.5
v1.24.4
v1.24.3
v1.24.2
v1.24.1
v1.24.0
v1.23.8
v1.24.0-rc0
v1.25.0-dev
v1.23.7
v1.23.6
v1.23.5
v1.23.4
v1.23.3
v1.23.2
v1.23.1
v1.23.0
v1.23.0-rc0
v1.24.0-dev
v1.22.6
v1.22.5
v1.22.4
v1.22.3
v1.22.2
v1.22.1
v1.22.0
v1.23.0-dev
v1.22.0-rc1
v1.21.11
v1.22.0-rc0
v1.21.10
v1.21.9
v1.21.8
v1.21.7
v1.21.6
v1.21.5
v1.21.4
v1.21.3
v1.21.2
v1.20.6
v1.21.1
v1.21.0
v1.21.0-rc2
v1.21.0-rc1
v1.20.5
v1.22.0-dev
v1.21.0-rc0
v1.20.4
v1.20.3
v1.20.2
v1.20.1
v1.20.0
v1.19.4
v1.21.0-dev
v1.20.0-rc2
v1.20.0-rc1
v1.20.0-rc0
v1.19.3
v1.19.2
v1.19.1
v1.19.0
v1.19.0-rc1
v1.20.0-dev
v1.19.0-rc0
v1.18.5
v1.18.4
v1.18.3
v1.18.2
v1.18.1
v1.18.0
v1.17.4
v1.18.0-rc1
v1.19.0-dev
v1.18.0-rc0
v1.17.3
v1.17.2
v1.17.1
v1.17.0
v1.17.0-rc2
v1.16.9
v1.17.0-rc1
v1.18.0-dev
v1.16.8
v1.16.7
v1.16.6
v1.16.5
v1.16.4
v1.16.3
v1.16.2
v1.16.1
v1.16.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.3.2
v1.3.1
v1.3.0
v1.3.0-rc2
v1.3.0-rc1
v1.2.3
v1.2.2
v1.2.1
v1.2.0
v1.2.0-rc3
v1.2.0-rc2
v1.1.4
v1.2.0-rc1
v1.1.3
v1.1.2
v1.1.1
v1.1.0
v1.0.2
v1.0.1
v1.0.0
v0.9.99
Labels
Clear labels
$20
$250
$50
$500
backport/done
💎 Bounty
docs-update-needed
good first issue
hacktoberfest
issue/bounty
issue/confirmed
issue/critical
issue/duplicate
issue/needs-feedback
issue/not-a-bug
issue/regression
issue/stale
issue/workaround
lgtm/need 2
modifies/api
modifies/translation
outdated/backport/v1.18
outdated/theme/markdown
outdated/theme/timetracker
performance/bigrepo
performance/cpu
performance/memory
performance/speed
pr/breaking
proposal/accepted
proposal/rejected
pr/wip
pull-request
reviewed/wontfix
💰 Rewarded
skip-changelog
status/blocked
topic/accessibility
topic/api
topic/authentication
topic/build
topic/code-linting
topic/commit-signing
topic/content-rendering
topic/deployment
topic/distribution
topic/federation
topic/gitea-actions
topic/issues
topic/lfs
topic/mobile
topic/moderation
topic/packages
topic/pr
topic/projects
topic/repo
topic/repo-migration
topic/security
topic/theme
topic/ui
topic/ui-interaction
topic/ux
topic/webhooks
topic/wiki
type/bug
type/deprecation
type/docs
type/enhancement
type/feature
type/miscellaneous
type/proposal
type/question
type/refactoring
type/summary
type/testing
type/upstream
Mirrored from GitHub Pull Request
Milestone
No items
No Milestone
Projects
Clear projects
No project
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/gitea#175
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tboerger on GitHub (Dec 27, 2016).
I would like to integrate an auto-updater for Gitea. This will only work for our prebuilt binaries and our Docker container of course, for everything else we are out of control and the admin is responsible for the update on his own.
The functionality should be added via an build flag so that the regular builds by admins don't get this functionality.
Options
I can think about various options how we can handle this functionality. Below is a list of the options i though about:
Tools
A pretty mature library is already out there in the wild, I would suggest to use https://github.com/inconshreveable/go-update for this. For the hosting of the updates we got the option to use our CDN based https://dl.gitea.io page or the service https://equinox.io/ offered by @inconshreveable.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
@Bwko commented on GitHub (Dec 27, 2016):
Why not add a setting to app.ini? That way you don't have to recompile the binary when you decide to turn on auto updates.
@joubertredrat commented on GitHub (Dec 27, 2016):
this auto update will be for all installation options or only install by binary?
@tboerger commented on GitHub (Dec 27, 2016):
Because the functionality will be only available for our pre-compiled binaries and our docker image. Everything else can be built totally different and is not in our control. On top of the build flag there will be a setting to opt-out from this process.
We can provide it only for our pre-compiled binaries, you never know which build tags and so on another install got.
@Bwko commented on GitHub (Dec 27, 2016):
@tboerger Fair point.
I prefer a third option: same behaviour as option 2 but with an option to automatically update when there's a security/critical (non breaking) update.
@bkcsoft commented on GitHub (Dec 27, 2016):
We should probably start with a update-button in admin-view, that gives us basic functions like "Check version against server" (
.sig-files as well 😉) and "Update". At a later stage we can add auto-checking and auto-updating, since most likely people will not want to auto-update.In any case, Auto-Update should be opt-in 😒
@pgaskin commented on GitHub (Mar 2, 2017):
What happens to the setcap permissions which I use to bind to port 80. When the binary is replaced, these needs to be set again, which needs root.
@tboerger commented on GitHub (Mar 2, 2017):
That's something that needs to be tested, but AFAIK it doesn't replace the entire binary, it's doing a binary diff and merge.
@lunny commented on GitHub (Mar 3, 2017):
So let's implment #1101 at first and move this to 1.x.x
@NotAFile commented on GitHub (Nov 26, 2018):
I think notifications solve a lot of this...
Updating is pretty easy, but I currently have no idea if there is a new version of gitea unless I go and check myself.
@SohnyBohny commented on GitHub (Nov 26, 2018):
There is a RSS feed for blog.gitea.io
@CMiksche commented on GitHub (Nov 26, 2018):
I have written a python script to update gitea (but you may need to change the script for your system):
Blog Post: http://blog.m5e.de/gitea/update/upgrade/bash/script/2018/11/26/gitea-auto-update-script.html
GitHub Repo: https://github.com/CMiksche/gitea-auto-update
Maybe a solution until the direct go implementation is finally here - sadly it's nearly two years since this issue was created ...
@sapk commented on GitHub (Nov 26, 2018):
I could try to implement it with https://github.com/rhysd/go-github-selfupdate
@4oo4 commented on GitHub (Nov 26, 2018):
Here's the quick and dirty script I use for auto updates (it assumes that you have gitea as a systemd/init.d service):
https://gist.github.com/4oo4/a53affc5e977bfacfbfa2aed0172ed13
@tboerger commented on GitHub (Nov 27, 2018):
@sapk no, please don't... A github specific updater built into the binary won't be merged since it will anyway break after a migration to selfhosting.
A selfupdating application isn't that easy, and useful for the prebuilt binaries only. Beside that there are other things that also got to be integrated like optin or optout...
@sapk commented on GitHub (Nov 27, 2018):
@tboerger It support enterprise version so it support custom url. I could try if it already work with gitea or if we need to fork/PR to be compatible.
@peacepenguin commented on GitHub (Jun 20, 2019):
Here's a script and setup notes on how I configure Gitea to auto-update on Ubuntu 18.04 for a binary install:
https://gist.github.com/peacepenguin/9482c248b3d99e6bd3ccab74826e6923
@Torstein-Eide commented on GitHub (Sep 27, 2020):
I would recommended to use @CMiksche python script for updating
https://github.com/CMiksche/gitea-auto-update
@tboerger commented on GitHub (Dec 19, 2020):
I'm not really involved into Gitea anymore, so I'm closing this issue. If there ist still interest please open a new issue and maybe link to this one for initial discussion. I want to get my issues cleaned up.