From 717f5c2f9b1a74b5f39e8716165c76c2c362a278 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Sun, 8 Feb 2026 13:44:01 +0000 Subject: [PATCH] fix: pass git SHA to Docker build so /v returns actual commit hash Co-Authored-By: yujonglee --- .github/workflows/ai_cd.yaml | 2 +- apps/ai/Dockerfile | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ai_cd.yaml b/.github/workflows/ai_cd.yaml index ea88252564..93ae8dd8ea 100644 --- a/.github/workflows/ai_cd.yaml +++ b/.github/workflows/ai_cd.yaml @@ -27,7 +27,7 @@ jobs: steps: - uses: actions/checkout@v4 - uses: superfly/flyctl-actions/setup-flyctl@master - - run: flyctl deploy --config apps/ai/fly.toml --dockerfile apps/ai/Dockerfile --remote-only --build-arg APP_VERSION=${{ needs.compute-version.outputs.version }} + - run: flyctl deploy --config apps/ai/fly.toml --dockerfile apps/ai/Dockerfile --remote-only --build-arg APP_VERSION=${{ needs.compute-version.outputs.version }} --build-arg GIT_SHA=${{ github.sha }} env: FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} diff --git a/apps/ai/Dockerfile b/apps/ai/Dockerfile index 1d3e748b44..9b7621dc8f 100644 --- a/apps/ai/Dockerfile +++ b/apps/ai/Dockerfile @@ -15,11 +15,13 @@ RUN cargo chef prepare --recipe-path recipe.json FROM rust:${RUST_VERSION}-bookworm AS build ARG APP_VERSION +ARG GIT_SHA RUN apt-get update && apt-get install -y --no-install-recommends pkg-config libssl-dev ca-certificates && rm -rf /var/lib/apt/lists/* RUN cargo install cargo-chef sccache --locked ENV RUSTC_WRAPPER=sccache \ SCCACHE_DIR=/sccache \ - APP_VERSION=${APP_VERSION} + APP_VERSION=${APP_VERSION} \ + VERGEN_GIT_SHA=${GIT_SHA} WORKDIR /app COPY --from=planner /app/recipe.json recipe.json RUN --mount=type=cache,target=/usr/local/cargo/registry,sharing=locked \