diff --git a/.github/workflows/_container.yml b/.github/workflows/_container.yml index eafe9231e..c52af34b8 100644 --- a/.github/workflows/_container.yml +++ b/.github/workflows/_container.yml @@ -52,9 +52,6 @@ jobs: load: true tags: tag_for_testing - - name: Test cli works in cached runtime image - run: docker run --rm tag_for_testing --version - - name: Create tags for publishing image id: meta uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5 @@ -64,6 +61,20 @@ jobs: type=ref,event=tag type=raw,value=latest + - name: Test cli works in cached runtime image + id: app-version + run: | + APP_VERSION=$(docker run --rm tag_for_testing --version) + echo "Version in built container: $APP_VERSION" + echo "version=$APP_VERSION" >> "$GITHUB_OUTPUT" + + - name: Check versions match + if: github.ref_type == 'tag' + run: '[[ "$APP_VERSION" = "blueapi, version $REPO_VERSION" ]]' + env: + APP_VERSION: ${{ steps.app-version.outputs.version }} + REPO_VERSION: ${{ steps.meta.outputs.version }} + - name: Push cached image to container registry if: github.ref_type == 'tag' uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6 diff --git a/Dockerfile b/Dockerfile index 41b79c25f..b2486f1cb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ RUN apt-get update -y && apt-get install -y --no-install-recommends \ graphviz \ && apt-get dist-clean -# Install helm for the dev container. This is the recommended +# Install helm for the dev container. This is the recommended # approach per the docs: https://helm.sh/docs/intro/install RUN curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3; \ chmod 700 get_helm.sh; \ @@ -27,12 +27,12 @@ RUN chmod o+wrX . # Tell uv sync to install python in a known location so we can copy it out later ENV UV_PYTHON_INSTALL_DIR=/python -RUN uv add debugpy - # Sync the project without its dev dependencies RUN --mount=type=cache,target=/root/.cache/uv \ uv sync --locked --no-editable --no-dev --managed-python +RUN uv pip install debugpy + # The runtime stage copies the built venv into a runtime container FROM ubuntu:resolute AS runtime