Files
SnipitRepo/Linux/Docs/Setup-autoupdate-gitea.md

52 lines
1.2 KiB
Markdown

# 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
```