Align CI/CD with shared infra/ci-workflows and drop compose-based CI.
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:
@@ -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 \
|
||||
|
||||
Reference in New Issue
Block a user