Align CI/CD with shared infra/ci-workflows and drop compose-based CI.
CI / changes (push) Successful in 1m4s
CI / backend (push) Failing after 0s
CI / frontend (push) Failing after 0s

Replace hand-rolled jobs with @v1 callers, capped bake/migrate CD, and remove the docker-compose.ci.yml bridge workaround.
This commit is contained in:
2026-10-06 19:10:58 +08:00
parent 1124c1f079
commit 5a175e3fba
12 changed files with 397 additions and 197 deletions
+9 -5
View File
@@ -24,9 +24,8 @@ RUN sed -i \
-e 's/"SecretKey": "[^"]*"/"SecretKey": ""/' \
/app/publish/appsettings.json
# ---- optional target: EF migration bundle, built and extracted by the CD
# migrate job (docker build --target migrate + docker cp). Never shipped in the
# runtime image below. ----
# ---- optional target: EF migration bundle (SDK stage). CD bakes migrate-bundle
# (scratch) and extracts via docker create + docker cp — never ship this stage. ----
FROM build AS migrate
RUN dotnet tool install --global dotnet-ef --version 8.*
ENV PATH="$PATH:/root/.dotnet/tools"
@@ -35,8 +34,13 @@ RUN dotnet ef migrations bundle \
--self-contained -r linux-x64 \
--output /out/migrate-api
# ---- runtime ----
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime
# scratch + CMD so bare `docker create IMAGE` works (FROM scratch has no default cmd).
FROM scratch AS migrate-bundle
COPY --from=migrate /out/migrate-api /out/migrate-api
CMD ["/out/migrate-api"]
# ---- runtime (bake target "final") ----
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS final
WORKDIR /app
RUN apt-get update \