diff --git a/.github/workflows/build-latest.yml b/.github/workflows/build-latest.yml index e67595db..204b9344 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 buildx imagetools create -t ${{ env.REGISTRY }}/${{ github.repository }}/urunc-deploy:${{ env.SHA_SHORT }} \ + ${{ env.REGISTRY }}/${{ github.repository }}/urunc-deploy:${{ env.TAG }} + fi + + - name: Install cosign uses: sigstore/cosign-installer@d58896d6a1865668819e1d91763c7751a165e159 # main @@ -223,4 +230,4 @@ jobs: -a "repo=${{github.repository}}" \ -a "workflow=${{github.workflow}}" \ -a "ref=${{github.sha}}" \ - -a "author=Nubificus LTD" + -a "author=Nubificus LTD" \ No newline at end of file diff --git a/docs/tutorials/How-to-urunc-on-k8s.md b/docs/tutorials/How-to-urunc-on-k8s.md index 259cb11b..aee909fd 100644 --- a/docs/tutorials/How-to-urunc-on-k8s.md +++ b/docs/tutorials/How-to-urunc-on-k8s.md @@ -97,6 +97,13 @@ 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. +By default, the `latest` tag is used, which corresponds to the main branch. To deploy a specific version, replace `latest` with the respective commit hash (e.g., `abc1234`) in the manifest using: + +```bash +sed -i 's|ghcr.io/urunc-dev/urunc/urunc-deploy:latest|ghcr.io/urunc-dev/urunc/urunc-deploy:abc1234|' 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: