@@ -173,28 +173,9 @@ jobs:
173173 with :
174174 ref : ${{ inputs.ref }}
175175
176- - name : Verify managed runtime boundary version
177- shell : bash
178- run : |
179- python - <<'PY'
180- import re
181- from pathlib import Path
182-
183- version_source = Path("src/qwenpaw/__version__.py").read_text()
184- dockerfile = Path("deploy/Dockerfile").read_text()
185- version = re.search(r'__version__ = "([^"]+)"', version_source)
186- boundary = re.search(
187- r'ARG QWENPAW_MANAGED_RUNTIME_BOUNDARY_VERSION="([^"]+)"',
188- dockerfile,
189- )
190- if version is None or boundary is None:
191- raise SystemExit("Unable to read runtime boundary versions")
192- if version.group(1) != boundary.group(1):
193- raise SystemExit(
194- f"Runtime boundary version mismatch: "
195- f"{boundary.group(1)} != {version.group(1)}",
196- )
197- PY
176+ - name : Get QwenPaw version
177+ id : version
178+ uses : ./.github/actions/get-version
198179
199180 - name : Log in to Aliyun ACR (when credentials available)
200181 if : env.ACR_USERNAME != ''
@@ -210,6 +191,7 @@ jobs:
210191 env :
211192 DOCKER_NODE_IMAGE : ${{ inputs.docker_node_image }}
212193 DOCKER_UV_IMAGE : ${{ inputs.docker_uv_image }}
194+ QWENPAW_VERSION : ${{ steps.version.outputs.version }}
213195 run : |
214196 BUILD_ARGS=""
215197 if [ -n "$DOCKER_NODE_IMAGE" ]; then
@@ -221,9 +203,22 @@ jobs:
221203 docker build \
222204 -f deploy/Dockerfile \
223205 -t qwenpaw-verify:test \
206+ --build-arg \
207+ QWENPAW_MANAGED_RUNTIME_BOUNDARY_VERSION="$QWENPAW_VERSION" \
224208 $BUILD_ARGS \
225209 .
226210
211+ - name : Verify managed runtime boundary version
212+ env :
213+ QWENPAW_VERSION : ${{ steps.version.outputs.version }}
214+ run : |
215+ actual=$(docker image inspect qwenpaw-verify:test \
216+ --format '{{ index .Config.Labels "io.qwenpaw.managed-runtime-boundary.version" }}')
217+ if [ "$actual" != "$QWENPAW_VERSION" ]; then
218+ echo "::error::Runtime boundary version mismatch: $actual != $QWENPAW_VERSION"
219+ exit 1
220+ fi
221+
227222 - name : Start container
228223 run : |
229224 docker run -d \
0 commit comments