Both workflows were written for github.com and relied on the implicit secrets.GITHUB_TOKEN + github.repository + a hardcoded github.com URL. On this self-hosted Gitea instance (ghauth.rudolf.keenetic.link) they fail with "Invalid username or token. Password authentication is not supported for Git operations." against https://github.com/admin/brencher.git. The fix: - Read the push token from a new repo-level secret GITEA_PUSH_TOKEN (admin/brencher). Same value is injected into the checkout and into the rewritten remote URL so push can succeed. - Build the origin URL from Gitea-injected GITHUB_REPOSITORY and GITEA_SERVER_URL instead of hardcoding github.com. - Update git user.email/name for the Gitea Actions identity. To enable: create secret GITEA_PUSH_TOKEN in admin/brencher (a PAT with write access to the repo) via the Gitea UI before merging this PR.
Technical description
Use language python.
Locally run in venv create with uv tool. Use venv with uv for Python environment management and dependency installation. Keep requirements.txt updated.
Backend server flask.
UI - use plain javascript
App should be delivered as docker image.
Generate docker compose file to deploy to docker swarm.
Local start
python ./backend/app.py brencher_local1:docker_swarm_check_by_version noweb
Prod recovery
uv venv --python 3.12.3 .venv
uv pip install -r requirements.txt
python ./backend/app.py brencher:docker_swarm_check_by_version noweb
Update docker secret
docker service scale brencher_brencher-backend=0 brencher2_brencher-backend=0 docker service update --secret-rm brencher-secrets brencher_brencher-backend docker service update --secret-rm brencher-secrets brencher2_brencher-backend docker secret rm brencher-secrets
printf "GIT_USERNAME=git\nGIT_PASSWORD=TODO\n" |
docker secret create brencher-secrets -
docker service update --secret-add brencher-secrets brencher_brencher-backend docker service update --secret-add brencher-secrets brencher2_brencher-backend docker service scale brencher_brencher-backend=1 brencher2_brencher-backend=1