From 9811ba44e39fc3d160f9dd4954988d2e35cdda22 Mon Sep 17 00:00:00 2001 From: Shiva Kumar Date: Fri, 14 Nov 2025 22:37:11 +0530 Subject: [PATCH] Tag git commit sha with bundle image Signed-off-by: Shiva Kumar (SW-CLOUD) --- .github/workflows/ci.yaml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 221c891da..94209e4b9 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -438,11 +438,20 @@ jobs: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Set environment variables + id: vars + run: | + echo "COMMIT_SHORT_SHA=${GITHUB_SHA:0:8}" >> $GITHUB_ENV + - name: Update bundle CSV + run: | + sed -i '' -e 's|ghcr.io/nvidia/gpu-operator:[^ "]*|ghcr.io/nvidia/gpu-operator:${{ env.COMMIT_SHORT_SHA }}|g' bundle/manifests/gpu-operator-certified.clusterserviceversion.yaml + echo "Bundle CSV updated successfully" - name: Build bundle-image env: - BUNDLE_IMAGE: "ghcr.io/nvidia/gpu-operator/gpu-operator-bundle:${{ github.ref_name }}-latest" + IMAGE_NAME: "ghcr.io/nvidia/gpu-operator/gpu-operator-bundle" VERSION: "" DEFAULT_CHANNEL: "stable" CHANNELS: "stable" run: | - make push-bundle-image + make push-bundle-image BUNDLE_IMAGE=${IMAGE_NAME}:${{ github.ref_name }}-latest + make push-bundle-image BUNDLE_IMAGE=${IMAGE_NAME}:${{ env.COMMIT_SHORT_SHA }}