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.
This commit is contained in:
1 parent
4cd6f4d26c
commit
d68cee949d
1 file changed
+12
@@ -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: |
|
||||
|
||||
Reference in new issue
Block a user