2.0 KiB
2.0 KiB
Dedicated Gitea Runtime Builder Runner
Goal: build API/Worker runtime image tar on a machine that does not host production services.
Required machine
Minimum recommended spec:
- 2 vCPU minimum, 4 vCPU preferred.
- 4GiB RAM minimum, 8GiB preferred.
- 40GiB disk minimum.
- Docker Engine installed.
- Network access to Gitea and production SSH.
Do not install this runner on the current production host.
Runner label
The production runtime image workflow targets:
runs-on: runtime-builder
Register the new runner with a label named runtime-builder. Keep the existing production/staging runner separate.
Required Gitea secrets
Configure repository or organization secrets:
PRODUCTION_SSH_HOSTPRODUCTION_SSH_USERPRODUCTION_SSH_KEY
The key must allow uploading to:
/var/lib/xiaoxia-saas-production/runtime-images-<tag>.tar
Do not store SSH private keys in the repository.
Workflow behavior
On v* tag push:
build-production-runtime-imagesruns onruntime-builder.- It executes
scripts/build_release_images.sh <tag>. - It uploads
dist/release-images/xiaoxia-runtime-images-<tag>.tarto production. deploy-productionruns after the build job succeeds.deploy-productionloads/var/lib/xiaoxia-saas-production/runtime-images-<tag>.tarand restarts API/Worker/Web.
If the tar is missing, production deploy must fail.
Preflight checks on runner
Run on the new runner before registration:
docker version
docker ps --format '{{.Names}}' | grep -Eq '^(xiaoxia-(api|web|worker|postgres|redis)-production|gitea)$' && exit 1 || true
The second command must not find production containers.
Validation release
After runner registration:
- Push a test tag only after
developis green. - Confirm runtime image build job runs on the dedicated runner.
- Confirm production deploy waits for the image job.
- Run:
python scripts/smoke_public_auth_flow.py
python scripts/smoke_public_upload_flow.py
- Record release result in the Phase progress document.