Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix(build): pass the CLI version at the three build sites I missed

Vlad Ligai717923b5349d
diff --git a/.github/actions/generate-openapi-spec/action.yml b/.github/actions/generate-openapi-spec/action.yml
index 6d450d99a6..07e54f945e 100644
--- a/.github/actions/generate-openapi-spec/action.yml
+++ b/.github/actions/generate-openapi-spec/action.yml
@@ -29,10 +29,19 @@ inputs:
runs:
using: "composite"
steps:
+ - name: Read pinned versions
+ shell: bash
+ # The base checkout predates this file, and its Dockerfile declares no ARG.
+ run: |
+ f="${{ inputs.source-path }}/build-versions.env"
+ if [ -f "$f" ]; then grep -E '^[A-Z_]+=' "$f" >> "$GITHUB_ENV"; fi
+
- name: Build the API image
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
with:
context: ${{ inputs.source-path }}/backend
+ build-args: |
+ INFISICAL_CLI_VERSION=${{ env.INFISICAL_CLI_VERSION }}
load: true
tags: ${{ inputs.container-name }}
cache-from: type=gha,scope=openapi-spec
diff --git a/.github/workflows/run-backend-tests.yml b/.github/workflows/run-backend-tests.yml
index 6e7ca54e24..751503f289 100644
--- a/.github/workflows/run-backend-tests.yml
+++ b/.github/workflows/run-backend-tests.yml
@@ -76,15 +76,17 @@ jobs:
# Lowercased: GHCR rejects uppercase repository names and the owner is "Infisical".
OWNER=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')
IMAGE="ghcr.io/${OWNER}/backend-fips-toolchain"
- TAG="${{ hashFiles('backend/Dockerfile.fips-toolchain') }}"
+ TAG="${{ hashFiles('backend/Dockerfile.fips-toolchain', 'build-versions.env') }}"
if docker pull --quiet "$IMAGE:$TAG"; then
echo "Using published toolchain $IMAGE:$TAG"
TOOLCHAIN="$IMAGE:$TAG"
else
echo "::notice::No published toolchain for $TAG (this PR changes backend/Dockerfile.fips-toolchain); building from source."
TOOLCHAIN="backend-fips-toolchain:$TAG"
+ set -a; . ./build-versions.env; set +a
docker build \
-f backend/Dockerfile.fips-toolchain \
+ --build-arg "INFISICAL_CLI_VERSION=$INFISICAL_CLI_VERSION" \
-t "$TOOLCHAIN" \
backend
fi