From d68cee949d678e4fb9d5fd299c72a3890b5894dc Mon Sep 17 00:00:00 2001 From: Duarte Santos Date: Tue, 18 Aug 2026 23:21:46 +0200 Subject: [PATCH] CI: auch das Image pruefen, das wirklich veroeffentlicht wird test.yml baut --target default und --target coach und prueft beide. Nur baut docker-publish.yml ueberhaupt kein Target: dort steht bloss context ./api, und damit geht raus, welche Stage im Dockerfile zufaellig zuletzt steht. Genau dieses Artefakt zieht jeder Selfhoster als :latest -- und es war das einzige, auf das keine einzige Zusicherung zeigte. Im Moment steht default zuletzt, es stimmt also. Aber das ist eine Eigenschaft der Reihenfolge im File, nicht eine, die irgendwo geprueft wird: eine angehaengte Stage im naechsten PR und das Standard-Image bekaeme SDK, bubblewrap und Codex, ohne dass ein Build rot wird. Also dieselbe Negativ-Pruefung noch einmal auf einen Build ohne --target. --- .github/workflows/test.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dd972bb..39cce46 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -106,6 +106,18 @@ jobs: - run: docker build --target default -t opengym-api:default ./api - run: docker build --target coach -t opengym-api:coach ./api + # No --target, exactly like docker-publish.yml. That workflow names no stage, so what it + # ships is whatever Dockerfile stage happens to be last -- and that untargeted artifact, + # not opengym-api:default above, is the image every self-hoster pulls as :latest. Build it + # the same way here so the assertion below is about the thing we actually publish. + - run: docker build -t opengym-api:published ./api + + - name: the image published as :latest has no AI runtime either + run: | + docker run --rm opengym-api:published node -e \ + 'import("@anthropic-ai/claude-agent-sdk").then(()=>{console.error("AI runtime present in the published image -- the last Dockerfile stage is no longer the runtime-free one");process.exit(1)},()=>process.exit(0))' + ! docker run --rm opengym-api:published codex --version + ! docker run --rm opengym-api:published bwrap --version - name: the default image boots and serves, with no AI runtime in it run: |