4545 rpm_release : ${{ steps.v.outputs.rpm_release }}
4646 # Semver without 'v' prefix (e.g. 0.6.0), used for image tags and release body
4747 semver : ${{ steps.v.outputs.semver }}
48+ # Commit resolved from RELEASE_TAG, used for image tags and downstream metadata
49+ source_sha : ${{ steps.v.outputs.source_sha }}
4850 steps :
4951 - uses : actions/checkout@v6
5052 with :
@@ -67,33 +69,41 @@ jobs:
6769 echo "rpm_version=$(uv run python tasks/scripts/release.py get-version --rpm-version)" >> "$GITHUB_OUTPUT"
6870 echo "rpm_release=$(uv run python tasks/scripts/release.py get-version --rpm-release)" >> "$GITHUB_OUTPUT"
6971 echo "semver=${RELEASE_TAG#v}" >> "$GITHUB_OUTPUT"
72+ echo "source_sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
7073
7174 build-gateway :
7275 needs : [compute-versions]
7376 uses : ./.github/workflows/docker-build.yml
7477 with :
7578 component : gateway
7679 cargo-version : ${{ needs.compute-versions.outputs.cargo_version }}
80+ image-tag : ${{ needs.compute-versions.outputs.source_sha }}
81+ checkout-ref : ${{ inputs.tag || github.ref }}
7782
7883 build-supervisor :
7984 needs : [compute-versions]
8085 uses : ./.github/workflows/docker-build.yml
8186 with :
8287 component : supervisor
8388 cargo-version : ${{ needs.compute-versions.outputs.cargo_version }}
89+ image-tag : ${{ needs.compute-versions.outputs.source_sha }}
90+ checkout-ref : ${{ inputs.tag || github.ref }}
8491
8592 build-cluster :
8693 needs : [compute-versions]
8794 uses : ./.github/workflows/docker-build.yml
8895 with :
8996 component : cluster
9097 cargo-version : ${{ needs.compute-versions.outputs.cargo_version }}
98+ image-tag : ${{ needs.compute-versions.outputs.source_sha }}
99+ checkout-ref : ${{ inputs.tag || github.ref }}
91100
92101 e2e :
93- needs : [build-gateway, build-supervisor, build-cluster]
102+ needs : [compute-versions, build-gateway, build-supervisor, build-cluster]
94103 uses : ./.github/workflows/e2e-test.yml
95104 with :
96- image-tag : ${{ github.sha }}
105+ image-tag : ${{ needs.compute-versions.outputs.source_sha }}
106+ checkout-ref : ${{ inputs.tag || github.ref }}
97107 runner : linux-arm64-cpu8
98108
99109 tag-ghcr-release :
@@ -110,16 +120,17 @@ jobs:
110120 set -euo pipefail
111121 REGISTRY="ghcr.io/nvidia/openshell"
112122 VERSION="${{ needs.compute-versions.outputs.semver }}"
123+ SOURCE_TAG="${{ needs.compute-versions.outputs.source_sha }}"
113124 for component in gateway supervisor cluster; do
114- echo "Tagging ${REGISTRY}/${component}:${{ github.sha } } as ${VERSION} and latest..."
125+ echo "Tagging ${REGISTRY}/${component}:${SOURCE_TAG } as ${VERSION} and latest..."
115126 docker buildx imagetools create \
116127 --prefer-index=false \
117128 -t "${REGISTRY}/${component}:${VERSION}" \
118- "${REGISTRY}/${component}:${{ github.sha } }"
129+ "${REGISTRY}/${component}:${SOURCE_TAG }"
119130 docker buildx imagetools create \
120131 --prefer-index=false \
121132 -t "${REGISTRY}/${component}:latest" \
122- "${REGISTRY}/${component}:${{ github.sha } }"
133+ "${REGISTRY}/${component}:${SOURCE_TAG }"
123134 done
124135
125136 build-python-wheels-linux :
@@ -918,6 +929,7 @@ jobs:
918929 env :
919930 GITLAB_CI_TRIGGER_TOKEN : ${{ secrets.GITLAB_CI_TRIGGER_TOKEN }}
920931 GITLAB_CI_TRIGGER_URL : ${{ secrets.GITLAB_CI_TRIGGER_URL }}
932+ COMMIT_SHA : ${{ needs.compute-versions.outputs.source_sha }}
921933 RELEASE_VERSION : ${{ needs.compute-versions.outputs.python_version }}
922934 RELEASE_TAG : ${{ env.RELEASE_TAG }}
923935 WHEEL_FILENAMES : ${{ needs.release.outputs.wheel_filenames }}
@@ -936,7 +948,7 @@ jobs:
936948 -F "ref=main" \
937949 -F "variables[PIPELINE_ACTION]=publish_wheels" \
938950 -F "variables[GITHUB_REPOSITORY]=${GITHUB_REPOSITORY}" \
939- -F "variables[COMMIT_SHA]=${GITHUB_SHA }" \
951+ -F "variables[COMMIT_SHA]=${COMMIT_SHA }" \
940952 -F "variables[RELEASE_TAG]=${RELEASE_TAG}" \
941953 -F "variables[RELEASE_VERSION]=${RELEASE_VERSION}" \
942954 -F "variables[RELEASE_KIND]=stable" \
0 commit comments