build immutable image before deploy
Test, build, and deploy ComfyUI Jobs / test-build (push) Successful in 3m52s
Test, build, and deploy ComfyUI Jobs / deploy (push) Successful in 15s

This commit is contained in:
2026-10-02 22:48:04 +00:00
parent 5107284c71
commit eb2ba4d19d
2 changed files with 51 additions and 7 deletions
+1 -1
View File
@@ -15,4 +15,4 @@ The first run seeds `data/users.json` from `ADMIN_USERNAME` and `ADMIN_PASSWORD`
Gitea Actions deploys `develop`, `qa`, and `main` to the existing ComfyUiPortal target directories and preserves the existing 7002/6002/5002 port contract. On first startup of a fresh data directory, provide `ADMIN_USERNAME` and `ADMIN_PASSWORD` in the deployment host environment. Existing target data is retained during repository cutover.
The deployment workflow builds an immutable image tagged with the source commit SHA and publishes it to the Gitea container registry. If that SHA-tagged image already exists, the workflow reuses it instead of rebuilding. Configure the masked `REGISTRY_USERNAME` and `REGISTRY_PASSWORD` repository Actions secrets with a Gitea account/token that can write container packages. Compose receives the exact image reference through `IMAGE_REF`, so the same artifact can be redeployed or promoted without rebuilding.
After validation succeeds, the workflow builds one immutable image tagged with the source commit SHA on the Docker host and publishes it to the Gitea container registry. The deploy stage only pulls that exact image and restarts the service; it does not build. If the SHA-tagged image already exists, the workflow reuses it instead of rebuilding. Configure the masked `REGISTRY_USERNAME` and `REGISTRY_PASSWORD` repository Actions secrets with a Gitea account/token that can write container packages. Compose receives the exact image reference through `IMAGE_REF`, so the same artifact can be redeployed or promoted without rebuilding.