From 2fa2fc189efe884f913e8380d27ae072ace7189e Mon Sep 17 00:00:00 2001 From: Gregory Giguashvili Date: Fri, 26 Dec 2025 10:51:49 +0200 Subject: [PATCH] Implement the latest tag expansion in the CNCF workflow --- .github/workflows/cncf-conformance.yaml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cncf-conformance.yaml b/.github/workflows/cncf-conformance.yaml index e8dd3784..e70a2b44 100644 --- a/.github/workflows/cncf-conformance.yaml +++ b/.github/workflows/cncf-conformance.yaml @@ -50,7 +50,20 @@ jobs: run: | set -euo pipefail - IMAGE="${{ env.REGISTRY }}/microshift:${{ env.VERSION }}" + # Update the 'latest' tag to the latest released version from the + # MicroShift GitHub repository. + # Note: To test images from other repositories, override the 'VERSION' + # and 'REGISTRY' settings to point to a custom multi-arch manifest. + TAG="${{ env.VERSION }}" + if [ "${TAG}" = "latest" ] ; then + TAG="$(curl -s --max-time 60 "https://api.github.com/repos/microshift-io/microshift/releases/latest" | jq -r .tag_name)" + if [ -z "${TAG}" ] || [ "${TAG}" = "null" ] ; then + echo "ERROR: Could not determine the latest release tag from GitHub" + exit 1 + fi + fi + + IMAGE="${{ env.REGISTRY }}/microshift:${TAG}" echo "Pulling ${IMAGE}" sudo podman pull "${IMAGE}"