From 0a2611719a20f2e57d86d6bc699aac39b01ff085 Mon Sep 17 00:00:00 2001 From: Bram Prieshof Date: Tue, 8 Dec 2020 01:58:18 +0000 Subject: [PATCH] 'autoupdate-gitea.md' toevoegen --- autoupdate-gitea.md | 52 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 autoupdate-gitea.md diff --git a/autoupdate-gitea.md b/autoupdate-gitea.md new file mode 100644 index 0000000..a38e5f5 --- /dev/null +++ b/autoupdate-gitea.md @@ -0,0 +1,52 @@ +#gitea update tool +Tool from `https://github.com/CMiksche/gitea-auto-update` +or get local from `https://git.bprieshof.nl/Tools/gitea-auto-update` + +requires python 3.7+ + +# Install tool +## ubuntu 18.04 +``` +add-apt-repository ppa:deadsnakes/ppa +apt install python3.7 python3-pip + +python3.8 -m pip install gitea-auto-update +``` +##debian 10,ubuntu 20.04 +``` +apt install python3-pip -y +pip3 install gitea-auto-update +``` + +# Configuring +### all os's +Add the following to `/etc/gitea/auto-update.ini` +``` +[Gitea] +site=http://localhost:3000/api/v1/version +apiUrl=https://api.github.com/repos/go-gitea/gitea/releases/latest +system=linux-amd64 +file=/usr/local/bin/gitea +tmpDir=/tmp/ +buildFromSource= +sourceDir= +logFile=/var/log/gitupdate.log +``` + + + +## Cron job +### ubuntu 18.04 +Add the following to `/etc/crontab` +``` +0 5 * * 7 root /usr/bin/python3.8 /usr/local/bin/gitea-auto-update --settings=/etc/gitea/auto-update.ini +``` +### debian 10,ubuntu 20.04 +Add the following to `/etc/crontab` +``` +0 5 * * 7 root /usr/local/bin/gitea-auto-update --settings=/etc/gitea/auto-update.ini +``` +# Run manual update` +``` +gitea-auto-update --settings=/etc/gitea/auto-update.ini +``` \ No newline at end of file