ci(docker): carry vendored tinyagents into core image builds

The [patch.crates-io] path override made vendor/tinyagents part of the
cargo graph; the Dockerfile now COPYs vendor/ (needed already at the
dep-cache stage) and both docker jobs init just that submodule after
checkout (targeted init skips the large tauri-cef fork the core image
does not need). All other cargo-running CI jobs already checkout with
submodules: recursive/true; the mobile crates do not depend on the core
crate, so their submodules:false stays.

Claude-Session: https://claude.ai/code/session_013uVSkcdR2eP7hW4xm54wb4
This commit is contained in:
Steven Enamakel
2026-07-03 12:12:29 -07:00
parent 4c2895801d
commit fbafad2d38
3 changed files with 15 additions and 0 deletions
+5
View File
@@ -372,6 +372,11 @@ jobs:
with:
ref: ${{ needs.prepare-build.outputs.build_ref }}
fetch-depth: 1
# Targeted init (not `submodules: true`) so we skip the large tauri-cef
# fork the core image doesn't need. The Dockerfile COPYs vendor/ because
# [patch.crates-io] resolves tinyagents from vendor/tinyagents.
- name: Init tinyagents submodule
run: git submodule update --init vendor/tinyagents
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GHCR
+5
View File
@@ -265,6 +265,11 @@ jobs:
with:
ref: ${{ needs.prepare-build.outputs.build_ref }}
fetch-depth: 1
# Targeted init (not `submodules: true`) so we skip the large tauri-cef
# fork the core image doesn't need. The Dockerfile COPYs vendor/ because
# [patch.crates-io] resolves tinyagents from vendor/tinyagents.
- name: Init tinyagents submodule
run: git submodule update --init vendor/tinyagents
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build image (no push)
+5
View File
@@ -45,6 +45,11 @@ WORKDIR /build
# Cache dependencies — copy only manifests first
COPY Cargo.toml Cargo.lock rust-toolchain.toml ./
# Vendored TinyAgents SDK (git submodule; [patch.crates-io] points here, so
# the dep-cache build below already resolves it). CI must init the submodule
# before docker build — see the "Init tinyagents submodule" steps in
# release-production.yml / release-staging.yml.
COPY vendor/ vendor/
# Create a dummy src to build deps
RUN mkdir -p src && \
echo 'fn main() {}' > src/main.rs && \