Skip to content

Commit 9ffbac0

Browse files
authored
Merge pull request #1898 from NVIDIA/bundlecommitsha
Tag bundle image with current commit sha
2 parents 4011723 + 9811ba4 commit 9ffbac0

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

.github/workflows/ci.yaml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,11 +438,20 @@ jobs:
438438
registry: ghcr.io
439439
username: ${{ github.actor }}
440440
password: ${{ secrets.GITHUB_TOKEN }}
441+
- name: Set environment variables
442+
id: vars
443+
run: |
444+
echo "COMMIT_SHORT_SHA=${GITHUB_SHA:0:8}" >> $GITHUB_ENV
445+
- name: Update bundle CSV
446+
run: |
447+
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
448+
echo "Bundle CSV updated successfully"
441449
- name: Build bundle-image
442450
env:
443-
BUNDLE_IMAGE: "ghcr.io/nvidia/gpu-operator/gpu-operator-bundle:${{ github.ref_name }}-latest"
451+
IMAGE_NAME: "ghcr.io/nvidia/gpu-operator/gpu-operator-bundle"
444452
VERSION: ""
445453
DEFAULT_CHANNEL: "stable"
446454
CHANNELS: "stable"
447455
run: |
448-
make push-bundle-image
456+
make push-bundle-image BUNDLE_IMAGE=${IMAGE_NAME}:${{ github.ref_name }}-latest
457+
make push-bundle-image BUNDLE_IMAGE=${IMAGE_NAME}:${{ env.COMMIT_SHORT_SHA }}

0 commit comments

Comments
 (0)