feat(ci): publish container images to Forgejo registry
Some checks failed
CI Smoke / host-smoke (push) Successful in 1s
CI Smoke / container-smoke (push) Successful in 2s
Build and Publish Container Image / build-and-push (push) Failing after 2m30s

Add image.yaml workflow targeting forgejo.coulomb.social; update Dockerfile
for Forgejo PyPI secret names. Point pyproject issue-core index at Forgejo
(uv.lock regen blocked until issue-core is published there).
This commit is contained in:
tegwick 2026-07-12 00:32:32 +02:00
parent 1061f3ea3d
commit 050942ffc1
3 changed files with 73 additions and 14 deletions

View file

@ -2,12 +2,12 @@
#
# Build:
# docker build \
# --secret id=gitea_pypi_user,env=GITEA_PYPI_USER \
# --secret id=gitea_pypi_password,env=GITEA_PYPI_TOKEN \
# -t gitea.coulomb.social/coulomb/vergabe-teilnahme:<tag> .
# --secret id=forgejo_pypi_user,env=FORGEJO_PYPI_USER \
# --secret id=forgejo_pypi_password,env=FORGEJO_PYPI_TOKEN \
# -t forgejo.coulomb.social/coulomb/vergabe-teilnahme:<tag> .
#
# The optional secrets let uv authenticate to the Gitea Python package
# registry when resolving issue-core.
# Optional secrets authenticate to the Forgejo Python package registry
# when resolving issue-core.
# ─── Stage 1 ─── Vite + Tailwind asset build ────────────────────────────────
@ -41,14 +41,14 @@ COPY --from=ghcr.io/astral-sh/uv:0.5.11 /uv /usr/local/bin/uv
WORKDIR /app
COPY pyproject.toml uv.lock ./
RUN --mount=type=secret,id=gitea_pypi_user,required=false \
--mount=type=secret,id=gitea_pypi_password,required=false \
RUN --mount=type=secret,id=forgejo_pypi_user,required=false \
--mount=type=secret,id=forgejo_pypi_password,required=false \
sh -eu -c '\
if [ -f /run/secrets/gitea_pypi_user ]; then \
export UV_INDEX_GITEA_USERNAME="$(cat /run/secrets/gitea_pypi_user)"; \
if [ -f /run/secrets/forgejo_pypi_user ]; then \
export UV_INDEX_FORGEJO_USERNAME="$(cat /run/secrets/forgejo_pypi_user)"; \
fi; \
if [ -f /run/secrets/gitea_pypi_password ]; then \
export UV_INDEX_GITEA_PASSWORD="$(cat /run/secrets/gitea_pypi_password)"; \
if [ -f /run/secrets/forgejo_pypi_password ]; then \
export UV_INDEX_FORGEJO_PASSWORD="$(cat /run/secrets/forgejo_pypi_password)"; \
fi; \
uv sync --no-dev --no-install-project \
'