From 4804135015aa378518db551a1f6f27b923d700b0 Mon Sep 17 00:00:00 2001 From: prashantpandeygit Date: Wed, 28 Jan 2026 17:01:58 +0530 Subject: [PATCH] ci: add commit hash tag for urunc-deploy images Signed-off-by: prashantpandeygit --- .github/workflows/build-latest.yml | 9 +++++++++ docs/tutorials/How-to-urunc-on-k8s.md | 15 +++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/.github/workflows/build-latest.yml b/.github/workflows/build-latest.yml index bffac4d4..a85fb510 100644 --- a/.github/workflows/build-latest.yml +++ b/.github/workflows/build-latest.yml @@ -211,6 +211,13 @@ jobs: VAR=`docker manifest push ${{ env.REGISTRY }}/${{ github.repository }}/urunc-deploy:${{ env.TAG }} | tail -1` echo "manifest_sha=$VAR" >> "$GITHUB_OUTPUT" + # Also tag with commit hash on main branch + if [[ "${{ github.ref }}" == "refs/heads/main" && "${{ inputs.version-tag }}" != "true" ]]; then + docker manifest create ${{ env.REGISTRY }}/${{ github.repository }}/urunc-deploy:${{ env.SHA_SHORT }} $amend_command + docker manifest push ${{ env.REGISTRY }}/${{ github.repository }}/urunc-deploy:${{ env.SHA_SHORT }} + fi + + - name: Install cosign uses: sigstore/cosign-installer@d58896d6a1865668819e1d91763c7751a165e159 # main @@ -224,3 +231,5 @@ jobs: -a "workflow=${{github.workflow}}" \ -a "ref=${{github.sha}}" \ -a "author=Nubificus LTD" + + diff --git a/docs/tutorials/How-to-urunc-on-k8s.md b/docs/tutorials/How-to-urunc-on-k8s.md index 12001dc6..e28b6d63 100644 --- a/docs/tutorials/How-to-urunc-on-k8s.md +++ b/docs/tutorials/How-to-urunc-on-k8s.md @@ -97,6 +97,21 @@ kubectl get pods and artifacts required to run `urunc`, as well as reference DaemonSets, which can be utilized to install `urunc` runtime on a running Kubernetes cluster. +### Image Versioning + +When changes are pushed to the main branch, the `urunc-deploy` container image is +tagged with both `latest` and the commit hash (e.g., `abc1234`). To deploy a specific +version instead of `latest`, update the image tag in the manifest before applying: + +```bash +# Update the image tag to a specific commit hash +sed -i 's/:latest/:abc1234/' deployment/urunc-deploy/urunc-deploy/base/urunc-deploy.yaml + +# Apply the manifest +kubectl apply -f deployment/urunc-deploy/urunc-deploy/base/urunc-deploy.yaml +``` + + ### urunc-deploy in k3s To install in a k3s cluster, first we need to create the RBAC: