From c978cdccbe8d79766b6fa870aeb6c82a423eb22f Mon Sep 17 00:00:00 2001 From: Raees Khan Date: Thu, 19 Mar 2026 13:09:24 +0100 Subject: [PATCH 01/49] fix --- .github/known-versions/versions.json | 11 + .github/scripts/detect-new-versions.sh | 296 ++++++++++++++++++ .github/scripts/generate-dockerfile.sh | 54 ++++ .../auto-detect-and-publish-gardenlinux.yml | 196 ++++++++++++ 4 files changed, 557 insertions(+) create mode 100644 .github/known-versions/versions.json create mode 100755 .github/scripts/detect-new-versions.sh create mode 100755 .github/scripts/generate-dockerfile.sh create mode 100644 .github/workflows/auto-detect-and-publish-gardenlinux.yml diff --git a/.github/known-versions/versions.json b/.github/known-versions/versions.json new file mode 100644 index 00000000000..bfb108ad437 --- /dev/null +++ b/.github/known-versions/versions.json @@ -0,0 +1,11 @@ +{ + "sapmachine": { + "17": "17.0.18", + "21": "21.0.10.0.1", + "25": "25.0.2" + }, + "gardenlinux": { + "1592": "1592.18", + "1877": "1877.13" + } +} diff --git a/.github/scripts/detect-new-versions.sh b/.github/scripts/detect-new-versions.sh new file mode 100755 index 00000000000..6eb900e2ec6 --- /dev/null +++ b/.github/scripts/detect-new-versions.sh @@ -0,0 +1,296 @@ +#!/usr/bin/env bash +# ============================================================================== +# detect-new-versions.sh +# +# Detects newer versions of SapMachine and GardenLinux compared to the known +# versions stored in .github/known-versions/versions.json +# +# GardenLinux is tracked as a map of {major: latest_minor_version} so we can +# detect both new majors and new minor patch releases within a major. +# The minor version is used in Dockerfiles for reproducibility: +# FROM ghcr.io/gardenlinux/gardenlinux:1592.18 +# +# Outputs (as GitHub Actions outputs via $GITHUB_OUTPUT): +# new_sm_versions - JSON array of {major, version} objects for new SapMachine releases +# new_gl_versions - JSON array of {major, version} objects for new GardenLinux releases +# has_new_versions - "true" if any new version was detected +# build_matrix - JSON matrix of {sm_major, sm_version, gl_major, gl_version} combinations +# ============================================================================== +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +REPO_ROOT="$(cd "${SCRIPT_DIR}/../.." && pwd)" +KNOWN_VERSIONS_FILE="${REPO_ROOT}/.github/known-versions/versions.json" + +# --------------------------------------------------------------------------- +# 1. Load known versions +# --------------------------------------------------------------------------- +echo "::group::Loading known versions" +if [[ ! -f "${KNOWN_VERSIONS_FILE}" ]]; then + echo "ERROR: ${KNOWN_VERSIONS_FILE} not found" + exit 1 +fi +cat "${KNOWN_VERSIONS_FILE}" +echo "" +echo "::endgroup::" + +KNOWN_SM_MAJORS=$(jq -r '.sapmachine | keys[]' "${KNOWN_VERSIONS_FILE}") + +# --------------------------------------------------------------------------- +# 2. Fetch current SapMachine GA versions +# --------------------------------------------------------------------------- +echo "::group::Fetching SapMachine releases" +SM_JSON=$(curl -fsSL "https://sapmachine.io/assets/data/sapmachine-releases-latest.json") + +# Extract GA (non-ea) releases. For each, get the major version and the full +# version from the first release tag. Tag format: "sapmachine-" +declare -A CURRENT_SM_VERSIONS +for key in $(echo "${SM_JSON}" | jq -r 'to_entries[] | select(.value.ea == false) | .key'); do + major="${key}" # e.g. "17", "21", "25", "26" + tag=$(echo "${SM_JSON}" | jq -r --arg k "${key}" '.[$k].releases[0].tag') + # tag is like "sapmachine-17.0.18" or "sapmachine-25.0.2" or "sapmachine-26" + version="${tag#sapmachine-}" + CURRENT_SM_VERSIONS["${major}"]="${version}" + echo " SapMachine ${major} (GA): ${version}" +done +echo "::endgroup::" + +# --------------------------------------------------------------------------- +# 3. Fetch current active GardenLinux minor versions (latest per major) +# --------------------------------------------------------------------------- +echo "::group::Fetching GardenLinux active minor versions" +# Use the glrd container with JSON output to get all active minor releases, +# then extract the latest (highest) minor version per major. +GL_JSON=$(docker run --rm ghcr.io/gardenlinux/glrd \ + glrd --active --type minor --output-format json 2>/dev/null || echo '{"releases":[]}') + +# Build a map: gl_major → latest minor version string (e.g. "1592" → "1592.18") +# For versions < 2017: format is major.minor (e.g. 1592.18) +# For versions >= 2017: format is major.minor.patch (e.g. 2017.0.0) +declare -A CURRENT_GL_VERSIONS +if [[ "$(echo "${GL_JSON}" | jq '.releases | length')" -gt 0 ]]; then + # Group by major, take the one with the highest minor (and patch) per major + while IFS='|' read -r gl_major gl_minor_ver; do + CURRENT_GL_VERSIONS["${gl_major}"]="${gl_minor_ver}" + echo " GardenLinux ${gl_major} latest minor: ${gl_minor_ver}" + done < <(echo "${GL_JSON}" | jq -r ' + [.releases[] | { + major: (.version.major | tostring), + minor: .version.minor, + patch: (.version.patch // null), + version_str: ( + if .version.patch != null then + "\(.version.major).\(.version.minor).\(.version.patch)" + else + "\(.version.major).\(.version.minor)" + end + ) + }] + | group_by(.major) + | map(sort_by(.minor, .patch) | last) + | .[] + | "\(.major)|\(.version_str)" + ') +else + echo " WARNING: Could not fetch GardenLinux versions from glrd container." + echo " Falling back to known versions only." + # Load known versions as fallback + while IFS='=' read -r gl_major gl_ver; do + CURRENT_GL_VERSIONS["${gl_major}"]="${gl_ver}" + done < <(jq -r '.gardenlinux | to_entries[] | "\(.key)=\(.value)"' "${KNOWN_VERSIONS_FILE}") +fi +echo "::endgroup::" + +# --------------------------------------------------------------------------- +# 4. Determine new SapMachine versions +# --------------------------------------------------------------------------- +echo "::group::Detecting new SapMachine versions" +declare -a NEW_SM_ITEMS=() # each item: "major:version" + +for major in "${!CURRENT_SM_VERSIONS[@]}"; do + current_ver="${CURRENT_SM_VERSIONS[$major]}" + known_ver=$(jq -r --arg m "${major}" '.sapmachine[$m] // ""' "${KNOWN_VERSIONS_FILE}") + + if [[ -z "${known_ver}" ]]; then + echo " NEW SapMachine major ${major}: ${current_ver} (not previously tracked)" + NEW_SM_ITEMS+=("${major}:${current_ver}") + elif [[ "${current_ver}" != "${known_ver}" ]]; then + echo " UPDATED SapMachine ${major}: ${known_ver} -> ${current_ver}" + NEW_SM_ITEMS+=("${major}:${current_ver}") + else + echo " SapMachine ${major}: ${current_ver} (unchanged)" + fi +done +echo "::endgroup::" + +# --------------------------------------------------------------------------- +# 5. Determine new GardenLinux versions (new major or updated minor) +# --------------------------------------------------------------------------- +echo "::group::Detecting new GardenLinux versions" +declare -a NEW_GL_ITEMS=() # each item: "major:minor_version" + +for gl_major in "${!CURRENT_GL_VERSIONS[@]}"; do + current_minor="${CURRENT_GL_VERSIONS[$gl_major]}" + known_minor=$(jq -r --arg m "${gl_major}" '.gardenlinux[$m] // ""' "${KNOWN_VERSIONS_FILE}") + + if [[ -z "${known_minor}" ]]; then + echo " NEW GardenLinux major ${gl_major}: ${current_minor} (not previously tracked)" + NEW_GL_ITEMS+=("${gl_major}:${current_minor}") + elif [[ "${current_minor}" != "${known_minor}" ]]; then + echo " UPDATED GardenLinux ${gl_major}: ${known_minor} -> ${current_minor}" + NEW_GL_ITEMS+=("${gl_major}:${current_minor}") + else + echo " GardenLinux ${gl_major}: ${current_minor} (unchanged)" + fi +done +echo "::endgroup::" + +# --------------------------------------------------------------------------- +# 6. Build the matrix of (sm_major, sm_version, gl_major, gl_version) combos +# --------------------------------------------------------------------------- +echo "::group::Building matrix" + +# Collect ALL SM versions (known + current) +declare -A ALL_SM_VERSIONS +for major in ${KNOWN_SM_MAJORS}; do + ALL_SM_VERSIONS["${major}"]=$(jq -r --arg m "${major}" '.sapmachine[$m]' "${KNOWN_VERSIONS_FILE}") +done +for major in "${!CURRENT_SM_VERSIONS[@]}"; do + ALL_SM_VERSIONS["${major}"]="${CURRENT_SM_VERSIONS[$major]}" +done + +# Collect ALL GL versions (known + current, with current overriding known) +declare -A ALL_GL_VERSIONS +while IFS='=' read -r gl_major gl_ver; do + ALL_GL_VERSIONS["${gl_major}"]="${gl_ver}" +done < <(jq -r '.gardenlinux | to_entries[] | "\(.key)=\(.value)"' "${KNOWN_VERSIONS_FILE}") +for gl_major in "${!CURRENT_GL_VERSIONS[@]}"; do + ALL_GL_VERSIONS["${gl_major}"]="${CURRENT_GL_VERSIONS[$gl_major]}" +done + +MATRIX_JSON="[]" + +has_new_sm=$( [[ ${#NEW_SM_ITEMS[@]} -gt 0 ]] && echo "true" || echo "false" ) +has_new_gl=$( [[ ${#NEW_GL_ITEMS[@]} -gt 0 ]] && echo "true" || echo "false" ) + +if [[ "${has_new_sm}" == "true" && "${has_new_gl}" == "true" ]]; then + # Both new → full cross-product of ALL SM × ALL GL + echo " Both SapMachine and GardenLinux have new versions → full rebuild" + for sm_major in "${!ALL_SM_VERSIONS[@]}"; do + sm_ver="${ALL_SM_VERSIONS[$sm_major]}" + for gl_major in "${!ALL_GL_VERSIONS[@]}"; do + gl_ver="${ALL_GL_VERSIONS[$gl_major]}" + MATRIX_JSON=$(echo "${MATRIX_JSON}" | jq \ + --arg sm "$sm_major" --arg sv "$sm_ver" --arg gm "$gl_major" --arg gv "$gl_ver" \ + '. + [{"sm_major": $sm, "sm_version": $sv, "gl_major": $gm, "gl_version": $gv}]') + done + done + +elif [[ "${has_new_sm}" == "true" ]]; then + # Only new SM versions → new SM × ALL GL + echo " Only SapMachine has new versions → new SM × all GL" + for item in "${NEW_SM_ITEMS[@]}"; do + sm_major="${item%%:*}" + sm_ver="${item#*:}" + for gl_major in "${!ALL_GL_VERSIONS[@]}"; do + gl_ver="${ALL_GL_VERSIONS[$gl_major]}" + MATRIX_JSON=$(echo "${MATRIX_JSON}" | jq \ + --arg sm "$sm_major" --arg sv "$sm_ver" --arg gm "$gl_major" --arg gv "$gl_ver" \ + '. + [{"sm_major": $sm, "sm_version": $sv, "gl_major": $gm, "gl_version": $gv}]') + done + done + +elif [[ "${has_new_gl}" == "true" ]]; then + # Only new GL versions → ALL SM × new GL + echo " Only GardenLinux has new versions → all SM × new GL" + for sm_major in "${!ALL_SM_VERSIONS[@]}"; do + sm_ver="${ALL_SM_VERSIONS[$sm_major]}" + for item in "${NEW_GL_ITEMS[@]}"; do + gl_major="${item%%:*}" + gl_ver="${item#*:}" + MATRIX_JSON=$(echo "${MATRIX_JSON}" | jq \ + --arg sm "$sm_major" --arg sv "$sm_ver" --arg gm "$gl_major" --arg gv "$gl_ver" \ + '. + [{"sm_major": $sm, "sm_version": $sv, "gl_major": $gm, "gl_version": $gv}]') + done + done + +else + echo " No new versions detected — nothing to build." +fi + +MATRIX_COUNT=$(echo "${MATRIX_JSON}" | jq 'length') +echo " Total build combinations: ${MATRIX_COUNT}" +echo "${MATRIX_JSON}" | jq '.' +echo "::endgroup::" + +# --------------------------------------------------------------------------- +# 7. Produce outputs +# --------------------------------------------------------------------------- +HAS_NEW="false" +if [[ "${has_new_sm}" == "true" || "${has_new_gl}" == "true" ]]; then + HAS_NEW="true" +fi + +# Build new_sm_versions JSON array +SM_OUT="[]" +if [[ ${#NEW_SM_ITEMS[@]} -gt 0 ]]; then + for item in "${NEW_SM_ITEMS[@]}"; do + major="${item%%:*}" + ver="${item#*:}" + SM_OUT=$(echo "${SM_OUT}" | jq --arg m "${major}" --arg v "${ver}" '. + [{"major": $m, "version": $v}]') + done +fi + +# Build new_gl_versions JSON array +GL_OUT="[]" +if [[ ${#NEW_GL_ITEMS[@]} -gt 0 ]]; then + for item in "${NEW_GL_ITEMS[@]}"; do + gl_major="${item%%:*}" + gl_ver="${item#*:}" + GL_OUT=$(echo "${GL_OUT}" | jq --arg m "${gl_major}" --arg v "${gl_ver}" '. + [{"major": $m, "version": $v}]') + done +fi + +# Write to GITHUB_OUTPUT (multi-line safe) +if [[ -n "${GITHUB_OUTPUT:-}" ]]; then + { + echo "has_new_versions=${HAS_NEW}" + echo "new_sm_versions=${SM_OUT}" + echo "new_gl_versions=${GL_OUT}" + echo "build_matrix=${MATRIX_JSON}" + } >> "${GITHUB_OUTPUT}" +else + # For local testing + echo "" + echo "===== OUTPUTS =====" + echo "has_new_versions=${HAS_NEW}" + echo "new_sm_versions=${SM_OUT}" + echo "new_gl_versions=${GL_OUT}" + echo "build_matrix=${MATRIX_JSON}" +fi + +# --------------------------------------------------------------------------- +# 8. Update the known versions file +# --------------------------------------------------------------------------- +if [[ "${HAS_NEW}" == "true" ]]; then + echo "::group::Updating known versions file" + + UPDATED_JSON=$(cat "${KNOWN_VERSIONS_FILE}") + + # Update SapMachine versions + for major in "${!CURRENT_SM_VERSIONS[@]}"; do + ver="${CURRENT_SM_VERSIONS[$major]}" + UPDATED_JSON=$(echo "${UPDATED_JSON}" | jq --arg m "${major}" --arg v "${ver}" '.sapmachine[$m] = $v') + done + + # Update GardenLinux versions (map format: major → latest minor) + for gl_major in "${!ALL_GL_VERSIONS[@]}"; do + gl_ver="${ALL_GL_VERSIONS[$gl_major]}" + UPDATED_JSON=$(echo "${UPDATED_JSON}" | jq --arg m "${gl_major}" --arg v "${gl_ver}" '.gardenlinux[$m] = $v') + done + + echo "${UPDATED_JSON}" | jq '.' > "${KNOWN_VERSIONS_FILE}" + echo "Updated ${KNOWN_VERSIONS_FILE}:" + cat "${KNOWN_VERSIONS_FILE}" + echo "::endgroup::" +fi diff --git a/.github/scripts/generate-dockerfile.sh b/.github/scripts/generate-dockerfile.sh new file mode 100755 index 00000000000..bf5672d9cd3 --- /dev/null +++ b/.github/scripts/generate-dockerfile.sh @@ -0,0 +1,54 @@ +#!/usr/bin/env bash +# ============================================================================== +# generate-dockerfile.sh +# +# Generates a Dockerfile for a given SapMachine major version, full version, +# GardenLinux minor version, and flavour (jdk, jdk-headless, jre, jre-headless). +# +# Usage: +# ./generate-dockerfile.sh +# +# The gl_version should be the full minor version (e.g. 1592.18) which is used +# as the exact Docker base image tag for reproducibility. +# +# Example: +# ./generate-dockerfile.sh 21 21.0.12 1592.18 jdk /tmp/build +# ============================================================================== +set -euo pipefail + +SM_MAJOR="${1:?Usage: $0 }" +SM_VERSION="${2:?}" +GL_VERSION="${3:?}" +FLAVOUR="${4:?}" +OUTPUT_DIR="${5:?}" + +mkdir -p "${OUTPUT_DIR}" + +# Determine CMD based on flavour +if [[ "${FLAVOUR}" == jdk* ]]; then + CMD='["jshell"]' +else + CMD='["bash"]' +fi + +cat > "${OUTPUT_DIR}/Dockerfile" < /etc/apt/sources.list.d/sapmachine.list && \\ + apt-get update && \\ + apt-get -y --no-install-recommends install sapmachine-${SM_MAJOR}-${FLAVOUR}=${SM_VERSION} && \\ + rm -rf /var/lib/apt/lists/* && \\ + java -XshowSettings:properties -version + +ENV JAVA_HOME=/usr/lib/jvm/sapmachine-${SM_MAJOR} + +CMD ${CMD} +EOF + +echo "Generated Dockerfile at ${OUTPUT_DIR}/Dockerfile" diff --git a/.github/workflows/auto-detect-and-publish-gardenlinux.yml b/.github/workflows/auto-detect-and-publish-gardenlinux.yml new file mode 100644 index 00000000000..8a4937ee131 --- /dev/null +++ b/.github/workflows/auto-detect-and-publish-gardenlinux.yml @@ -0,0 +1,196 @@ +# ============================================================================== +# auto-detect-and-publish-gardenlinux.yml +# +# Automatically detects new SapMachine GA releases or new GardenLinux active +# minor versions, generates Dockerfiles on-the-fly, and builds + publishes +# multi-arch container images to ghcr.io/sap/sapmachine. +# +# Logic: +# - New SapMachine version → build it against ALL known GardenLinux versions +# - New GardenLinux version → build ALL known SapMachine versions against it +# - Both new → full cross-product of all SM × all GL +# - Neither new → skip entirely +# +# Schedule: Runs daily at 06:00 UTC. Can also be triggered manually. +# ============================================================================== +name: Auto-detect and publish SapMachine GardenLinux images + +on: + schedule: + - cron: '0 6 * * *' # Daily at 06:00 UTC + workflow_dispatch: # Allow manual trigger + +permissions: + contents: write # To commit updated known-versions file + packages: write # To push container images to GHCR + +concurrency: + group: "gardenlinux-auto-publish" + cancel-in-progress: false + +jobs: + # ============================================================================ + # Job 1: Detect new versions and compute the build matrix + # ============================================================================ + detect: + name: Detect new SapMachine / GardenLinux versions + runs-on: ubuntu-24.04 + outputs: + has_new_versions: ${{ steps.detect.outputs.has_new_versions }} + build_matrix: ${{ steps.detect.outputs.build_matrix }} + new_sm_versions: ${{ steps.detect.outputs.new_sm_versions }} + new_gl_versions: ${{ steps.detect.outputs.new_gl_versions }} + steps: + - name: Checkout repository + uses: actions/checkout@v6 + + - name: Install jq + run: | + sudo apt-get update -qq + sudo apt-get install -y -qq jq + + - name: Run version detection + id: detect + run: | + chmod +x .github/scripts/detect-new-versions.sh + .github/scripts/detect-new-versions.sh + + - name: Summary + run: | + echo "### Version Detection Results" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "- **Has new versions:** ${{ steps.detect.outputs.has_new_versions }}" >> $GITHUB_STEP_SUMMARY + echo "- **New SapMachine versions:** ${{ steps.detect.outputs.new_sm_versions }}" >> $GITHUB_STEP_SUMMARY + echo "- **New GardenLinux versions:** ${{ steps.detect.outputs.new_gl_versions }}" >> $GITHUB_STEP_SUMMARY + echo "- **Build matrix size:** $(echo '${{ steps.detect.outputs.build_matrix }}' | jq 'length')" >> $GITHUB_STEP_SUMMARY + + # ============================================================================ + # Job 2: Commit the updated known-versions file back to the repo + # ============================================================================ + update-known-versions: + name: Update known versions file + needs: [detect, build-and-publish] + if: needs.detect.outputs.has_new_versions == 'true' + runs-on: ubuntu-24.04 + steps: + - name: Checkout repository + uses: actions/checkout@v6 + + - name: Install jq + run: | + sudo apt-get update -qq + sudo apt-get install -y -qq jq + + - name: Update versions.json from detection outputs + env: + NEW_SM: ${{ needs.detect.outputs.new_sm_versions }} + NEW_GL: ${{ needs.detect.outputs.new_gl_versions }} + BUILD_MATRIX: ${{ needs.detect.outputs.build_matrix }} + run: | + # Update SapMachine versions from the build matrix + for row in $(echo "${BUILD_MATRIX}" | jq -r '.[] | "\(.sm_major)=\(.sm_version)"' | sort -u); do + sm_major="${row%%=*}" + sm_ver="${row#*=}" + jq --arg m "${sm_major}" --arg v "${sm_ver}" '.sapmachine[$m] = $v' \ + .github/known-versions/versions.json > tmp.json && mv tmp.json .github/known-versions/versions.json + done + # Update GardenLinux versions from the build matrix + for row in $(echo "${BUILD_MATRIX}" | jq -r '.[] | "\(.gl_major)=\(.gl_version)"' | sort -u); do + gl_major="${row%%=*}" + gl_ver="${row#*=}" + jq --arg m "${gl_major}" --arg v "${gl_ver}" '.gardenlinux[$m] = $v' \ + .github/known-versions/versions.json > tmp.json && mv tmp.json .github/known-versions/versions.json + done + echo "Updated versions.json:" + cat .github/known-versions/versions.json + + # - name: Commit and push updated versions + # run: | + # git config --local user.email "sapmachine@sap.com" + # git config --local user.name "SapMachine Github Actions Bot" + # git add .github/known-versions/versions.json + # git diff --cached --quiet || git commit -m "chore: update known SapMachine/GardenLinux versions [skip ci]" + # git push + + # ============================================================================ + # Job 3: Build and publish container images (matrix strategy) + # ============================================================================ + # build-and-publish: + # name: "Build SM ${{ matrix.combo.sm_major }} (${{ matrix.combo.sm_version }}) on GL ${{ matrix.combo.gl_major }} (${{ matrix.combo.gl_version }})" + # needs: detect + # if: needs.detect.outputs.has_new_versions == 'true' + # runs-on: ubuntu-24.04 + # strategy: + # fail-fast: false + # max-parallel: 4 + # matrix: + # combo: ${{ fromJson(needs.detect.outputs.build_matrix) }} + # defaults: + # run: + # shell: bash + # steps: + # - name: Checkout repository + # uses: actions/checkout@v6 + + # - name: Install qemu dependency for multi-arch build + # run: | + # sudo apt-get update + # sudo apt-get install -y qemu-user-static + + # - name: Generate Dockerfiles + # run: | + # chmod +x .github/scripts/generate-dockerfile.sh + # SM_MAJOR="${{ matrix.combo.sm_major }}" + # SM_VERSION="${{ matrix.combo.sm_version }}" + # GL_MAJOR="${{ matrix.combo.gl_major }}" + # GL_VERSION="${{ matrix.combo.gl_version }}" + + # for flavour in jdk jdk-headless jre jre-headless; do + # .github/scripts/generate-dockerfile.sh \ + # "${SM_MAJOR}" "${SM_VERSION}" "${GL_VERSION}" "${flavour}" \ + # "build/${SM_MAJOR}/gardenlinux/${GL_MAJOR}/${flavour}" + # done + + # - name: Login to GHCR + # run: | + # podman login -u token -p ${{ github.token }} ghcr.io + + # - name: Build and push multi-arch images + # run: | + # SM_FLAVOURS=(jdk jdk-headless jre jre-headless) + # SM_REGISTRY="ghcr.io/sap/sapmachine" + # SM_MAJOR="${{ matrix.combo.sm_major }}" + # SM_VERSION="${{ matrix.combo.sm_version }}" + # GL_MAJOR="${{ matrix.combo.gl_major }}" + # GL_VERSION="${{ matrix.combo.gl_version }}" + + # for sm_flvr in "${SM_FLAVOURS[@]}"; do + # build_dir="build/${SM_MAJOR}/gardenlinux/${GL_MAJOR}/${sm_flvr}" + # tag="${SM_MAJOR}-${sm_flvr}-gl-${GL_MAJOR}" + + # echo "::group::Building ${SM_REGISTRY}:${tag}" + # cd "${build_dir}" + + # podman manifest create "${SM_REGISTRY}:${tag}" + # podman build --platform linux/amd64,linux/arm64 --manifest "${SM_REGISTRY}:${tag}" . + # podman manifest push "${SM_REGISTRY}:${tag}" + + # echo "✅ Pushed ${SM_REGISTRY}:${tag}" + # echo "::endgroup::" + + # cd "${GITHUB_WORKSPACE}" + # done + + # - name: Summary + # run: | + # SM_MAJOR="${{ matrix.combo.sm_major }}" + # SM_VERSION="${{ matrix.combo.sm_version }}" + # GL_MAJOR="${{ matrix.combo.gl_major }}" + # GL_VERSION="${{ matrix.combo.gl_version }}" + # echo "### Published Images" >> $GITHUB_STEP_SUMMARY + # echo "" >> $GITHUB_STEP_SUMMARY + # echo "Base: ghcr.io/gardenlinux/gardenlinux:${GL_VERSION}" >> $GITHUB_STEP_SUMMARY + # echo "" >> $GITHUB_STEP_SUMMARY + # for flvr in jdk jdk-headless jre jre-headless; do + # echo "- \`ghcr.io/sap/sapmachine:${SM_MAJOR}-${flvr}-gl-${GL_MAJOR}\`" >> $GITHUB_STEP_SUMMARY + # done From 1c069af40aef8cf7664ddeb4f4be0757a1b7ac53 Mon Sep 17 00:00:00 2001 From: Raees Khan Date: Thu, 19 Mar 2026 13:10:38 +0100 Subject: [PATCH 02/49] fix --- .github/workflows/auto-detect-and-publish-gardenlinux.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/auto-detect-and-publish-gardenlinux.yml b/.github/workflows/auto-detect-and-publish-gardenlinux.yml index 8a4937ee131..c7bfcc16689 100644 --- a/.github/workflows/auto-detect-and-publish-gardenlinux.yml +++ b/.github/workflows/auto-detect-and-publish-gardenlinux.yml @@ -19,6 +19,7 @@ on: schedule: - cron: '0 6 * * *' # Daily at 06:00 UTC workflow_dispatch: # Allow manual trigger + push: permissions: contents: write # To commit updated known-versions file From 90adea58968a982585637b2b293898ee18c6dc33 Mon Sep 17 00:00:00 2001 From: Raees Khan Date: Thu, 19 Mar 2026 13:13:47 +0100 Subject: [PATCH 03/49] fix --- .github/workflows/auto-detect-and-publish-gardenlinux.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/auto-detect-and-publish-gardenlinux.yml b/.github/workflows/auto-detect-and-publish-gardenlinux.yml index c7bfcc16689..2880249531f 100644 --- a/.github/workflows/auto-detect-and-publish-gardenlinux.yml +++ b/.github/workflows/auto-detect-and-publish-gardenlinux.yml @@ -70,7 +70,8 @@ jobs: # ============================================================================ update-known-versions: name: Update known versions file - needs: [detect, build-and-publish] + #needs: [detect, build-and-publish] + needs: [detect] if: needs.detect.outputs.has_new_versions == 'true' runs-on: ubuntu-24.04 steps: From 114891cbc51cce5279e8794870c87042d670a981 Mon Sep 17 00:00:00 2001 From: Raees Khan Date: Thu, 19 Mar 2026 13:35:47 +0100 Subject: [PATCH 04/49] fix --- .github/scripts/detect-new-versions.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/scripts/detect-new-versions.sh b/.github/scripts/detect-new-versions.sh index 6eb900e2ec6..e7156d330d6 100755 --- a/.github/scripts/detect-new-versions.sh +++ b/.github/scripts/detect-new-versions.sh @@ -61,8 +61,7 @@ echo "::endgroup::" echo "::group::Fetching GardenLinux active minor versions" # Use the glrd container with JSON output to get all active minor releases, # then extract the latest (highest) minor version per major. -GL_JSON=$(docker run --rm ghcr.io/gardenlinux/glrd \ - glrd --active --type minor --output-format json 2>/dev/null || echo '{"releases":[]}') +GL_JSON=$(docker run --rm ghcr.io/gardenlinux/glrd "glrd --active --type minor --output-format json" 2>/dev/null || echo '{"releases":[]}') # Build a map: gl_major → latest minor version string (e.g. "1592" → "1592.18") # For versions < 2017: format is major.minor (e.g. 1592.18) From d5ba44a94365e50dd6367e0ea262fe350fc9cec8 Mon Sep 17 00:00:00 2001 From: Raees Khan Date: Thu, 19 Mar 2026 13:47:15 +0100 Subject: [PATCH 05/49] fix --- .github/scripts/detect-new-versions.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/scripts/detect-new-versions.sh b/.github/scripts/detect-new-versions.sh index e7156d330d6..90c3e644728 100755 --- a/.github/scripts/detect-new-versions.sh +++ b/.github/scripts/detect-new-versions.sh @@ -274,21 +274,21 @@ fi if [[ "${HAS_NEW}" == "true" ]]; then echo "::group::Updating known versions file" - UPDATED_JSON=$(cat "${KNOWN_VERSIONS_FILE}") +# UPDATED_JSON=$(cat "${KNOWN_VERSIONS_FILE}") - # Update SapMachine versions - for major in "${!CURRENT_SM_VERSIONS[@]}"; do - ver="${CURRENT_SM_VERSIONS[$major]}" - UPDATED_JSON=$(echo "${UPDATED_JSON}" | jq --arg m "${major}" --arg v "${ver}" '.sapmachine[$m] = $v') - done +# # Update SapMachine versions +# for major in "${!CURRENT_SM_VERSIONS[@]}"; do +# ver="${CURRENT_SM_VERSIONS[$major]}" +# UPDATED_JSON=$(echo "${UPDATED_JSON}" | jq --arg m "${major}" --arg v "${ver}" '.sapmachine[$m] = $v') +# done - # Update GardenLinux versions (map format: major → latest minor) - for gl_major in "${!ALL_GL_VERSIONS[@]}"; do - gl_ver="${ALL_GL_VERSIONS[$gl_major]}" - UPDATED_JSON=$(echo "${UPDATED_JSON}" | jq --arg m "${gl_major}" --arg v "${gl_ver}" '.gardenlinux[$m] = $v') - done +# # Update GardenLinux versions (map format: major → latest minor) +# for gl_major in "${!ALL_GL_VERSIONS[@]}"; do +# gl_ver="${ALL_GL_VERSIONS[$gl_major]}" +# UPDATED_JSON=$(echo "${UPDATED_JSON}" | jq --arg m "${gl_major}" --arg v "${gl_ver}" '.gardenlinux[$m] = $v') +# done - echo "${UPDATED_JSON}" | jq '.' > "${KNOWN_VERSIONS_FILE}" +# echo "${UPDATED_JSON}" | jq '.' > "${KNOWN_VERSIONS_FILE}" echo "Updated ${KNOWN_VERSIONS_FILE}:" cat "${KNOWN_VERSIONS_FILE}" echo "::endgroup::" From 3b74a8ab5b72eef310200a1a002838288e222130 Mon Sep 17 00:00:00 2001 From: Raees Khan Date: Thu, 19 Mar 2026 13:51:02 +0100 Subject: [PATCH 06/49] fix --- .github/scripts/detect-new-versions.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/scripts/detect-new-versions.sh b/.github/scripts/detect-new-versions.sh index 90c3e644728..e7156d330d6 100755 --- a/.github/scripts/detect-new-versions.sh +++ b/.github/scripts/detect-new-versions.sh @@ -274,21 +274,21 @@ fi if [[ "${HAS_NEW}" == "true" ]]; then echo "::group::Updating known versions file" -# UPDATED_JSON=$(cat "${KNOWN_VERSIONS_FILE}") + UPDATED_JSON=$(cat "${KNOWN_VERSIONS_FILE}") -# # Update SapMachine versions -# for major in "${!CURRENT_SM_VERSIONS[@]}"; do -# ver="${CURRENT_SM_VERSIONS[$major]}" -# UPDATED_JSON=$(echo "${UPDATED_JSON}" | jq --arg m "${major}" --arg v "${ver}" '.sapmachine[$m] = $v') -# done + # Update SapMachine versions + for major in "${!CURRENT_SM_VERSIONS[@]}"; do + ver="${CURRENT_SM_VERSIONS[$major]}" + UPDATED_JSON=$(echo "${UPDATED_JSON}" | jq --arg m "${major}" --arg v "${ver}" '.sapmachine[$m] = $v') + done -# # Update GardenLinux versions (map format: major → latest minor) -# for gl_major in "${!ALL_GL_VERSIONS[@]}"; do -# gl_ver="${ALL_GL_VERSIONS[$gl_major]}" -# UPDATED_JSON=$(echo "${UPDATED_JSON}" | jq --arg m "${gl_major}" --arg v "${gl_ver}" '.gardenlinux[$m] = $v') -# done + # Update GardenLinux versions (map format: major → latest minor) + for gl_major in "${!ALL_GL_VERSIONS[@]}"; do + gl_ver="${ALL_GL_VERSIONS[$gl_major]}" + UPDATED_JSON=$(echo "${UPDATED_JSON}" | jq --arg m "${gl_major}" --arg v "${gl_ver}" '.gardenlinux[$m] = $v') + done -# echo "${UPDATED_JSON}" | jq '.' > "${KNOWN_VERSIONS_FILE}" + echo "${UPDATED_JSON}" | jq '.' > "${KNOWN_VERSIONS_FILE}" echo "Updated ${KNOWN_VERSIONS_FILE}:" cat "${KNOWN_VERSIONS_FILE}" echo "::endgroup::" From 02b749df0767f5cb0a7d195ae30ff9eb0ade0a8f Mon Sep 17 00:00:00 2001 From: Raees Khan Date: Thu, 19 Mar 2026 14:09:15 +0100 Subject: [PATCH 07/49] fix --- .github/scripts/detect-new-versions.sh | 54 ++++++++++++------- .../auto-detect-and-publish-gardenlinux.yml | 32 +++++------ 2 files changed, 48 insertions(+), 38 deletions(-) diff --git a/.github/scripts/detect-new-versions.sh b/.github/scripts/detect-new-versions.sh index e7156d330d6..425736a966e 100755 --- a/.github/scripts/detect-new-versions.sh +++ b/.github/scripts/detect-new-versions.sh @@ -250,6 +250,19 @@ if [[ ${#NEW_GL_ITEMS[@]} -gt 0 ]]; then done fi +# Build full current-state JSON maps (for overriding versions.json in Job 2) +ALL_SM_JSON='{}' +for major in "${!CURRENT_SM_VERSIONS[@]}"; do + ver="${CURRENT_SM_VERSIONS[$major]}" + ALL_SM_JSON=$(echo "${ALL_SM_JSON}" | jq --arg m "${major}" --arg v "${ver}" '.[$m] = $v') +done + +ALL_GL_JSON='{}' +for gl_major in "${!CURRENT_GL_VERSIONS[@]}"; do + gl_ver="${CURRENT_GL_VERSIONS[$gl_major]}" + ALL_GL_JSON=$(echo "${ALL_GL_JSON}" | jq --arg m "${gl_major}" --arg v "${gl_ver}" '.[$m] = $v') +done + # Write to GITHUB_OUTPUT (multi-line safe) if [[ -n "${GITHUB_OUTPUT:-}" ]]; then { @@ -257,6 +270,8 @@ if [[ -n "${GITHUB_OUTPUT:-}" ]]; then echo "new_sm_versions=${SM_OUT}" echo "new_gl_versions=${GL_OUT}" echo "build_matrix=${MATRIX_JSON}" + echo "all_sm_versions=${ALL_SM_JSON}" + echo "all_gl_versions=${ALL_GL_JSON}" } >> "${GITHUB_OUTPUT}" else # For local testing @@ -266,30 +281,31 @@ else echo "new_sm_versions=${SM_OUT}" echo "new_gl_versions=${GL_OUT}" echo "build_matrix=${MATRIX_JSON}" + echo "all_sm_versions=${ALL_SM_JSON}" + echo "all_gl_versions=${ALL_GL_JSON}" fi # --------------------------------------------------------------------------- -# 8. Update the known versions file +# 8. Override the known versions file with current data from sources +# This completely replaces the file – stale versions (e.g. a GL major +# that is no longer active, or an SM version that was removed) are dropped. # --------------------------------------------------------------------------- -if [[ "${HAS_NEW}" == "true" ]]; then - echo "::group::Updating known versions file" +echo "::group::Overriding known versions file with current source data" - UPDATED_JSON=$(cat "${KNOWN_VERSIONS_FILE}") +# Build fresh JSON from CURRENT_SM_VERSIONS and CURRENT_GL_VERSIONS only +FRESH_JSON='{"sapmachine": {}, "gardenlinux": {}}' - # Update SapMachine versions - for major in "${!CURRENT_SM_VERSIONS[@]}"; do - ver="${CURRENT_SM_VERSIONS[$major]}" - UPDATED_JSON=$(echo "${UPDATED_JSON}" | jq --arg m "${major}" --arg v "${ver}" '.sapmachine[$m] = $v') - done +for major in "${!CURRENT_SM_VERSIONS[@]}"; do + ver="${CURRENT_SM_VERSIONS[$major]}" + FRESH_JSON=$(echo "${FRESH_JSON}" | jq --arg m "${major}" --arg v "${ver}" '.sapmachine[$m] = $v') +done - # Update GardenLinux versions (map format: major → latest minor) - for gl_major in "${!ALL_GL_VERSIONS[@]}"; do - gl_ver="${ALL_GL_VERSIONS[$gl_major]}" - UPDATED_JSON=$(echo "${UPDATED_JSON}" | jq --arg m "${gl_major}" --arg v "${gl_ver}" '.gardenlinux[$m] = $v') - done +for gl_major in "${!CURRENT_GL_VERSIONS[@]}"; do + gl_ver="${CURRENT_GL_VERSIONS[$gl_major]}" + FRESH_JSON=$(echo "${FRESH_JSON}" | jq --arg m "${gl_major}" --arg v "${gl_ver}" '.gardenlinux[$m] = $v') +done - echo "${UPDATED_JSON}" | jq '.' > "${KNOWN_VERSIONS_FILE}" - echo "Updated ${KNOWN_VERSIONS_FILE}:" - cat "${KNOWN_VERSIONS_FILE}" - echo "::endgroup::" -fi +echo "${FRESH_JSON}" | jq '.' > "${KNOWN_VERSIONS_FILE}" +echo "Overwritten ${KNOWN_VERSIONS_FILE} with current source data:" +cat "${KNOWN_VERSIONS_FILE}" +echo "::endgroup::" diff --git a/.github/workflows/auto-detect-and-publish-gardenlinux.yml b/.github/workflows/auto-detect-and-publish-gardenlinux.yml index 2880249531f..40c1f4efe2c 100644 --- a/.github/workflows/auto-detect-and-publish-gardenlinux.yml +++ b/.github/workflows/auto-detect-and-publish-gardenlinux.yml @@ -41,6 +41,8 @@ jobs: build_matrix: ${{ steps.detect.outputs.build_matrix }} new_sm_versions: ${{ steps.detect.outputs.new_sm_versions }} new_gl_versions: ${{ steps.detect.outputs.new_gl_versions }} + all_sm_versions: ${{ steps.detect.outputs.all_sm_versions }} + all_gl_versions: ${{ steps.detect.outputs.all_gl_versions }} steps: - name: Checkout repository uses: actions/checkout@v6 @@ -83,27 +85,19 @@ jobs: sudo apt-get update -qq sudo apt-get install -y -qq jq - - name: Update versions.json from detection outputs + - name: Override versions.json with current source data env: - NEW_SM: ${{ needs.detect.outputs.new_sm_versions }} - NEW_GL: ${{ needs.detect.outputs.new_gl_versions }} - BUILD_MATRIX: ${{ needs.detect.outputs.build_matrix }} + ALL_SM: ${{ needs.detect.outputs.all_sm_versions }} + ALL_GL: ${{ needs.detect.outputs.all_gl_versions }} run: | - # Update SapMachine versions from the build matrix - for row in $(echo "${BUILD_MATRIX}" | jq -r '.[] | "\(.sm_major)=\(.sm_version)"' | sort -u); do - sm_major="${row%%=*}" - sm_ver="${row#*=}" - jq --arg m "${sm_major}" --arg v "${sm_ver}" '.sapmachine[$m] = $v' \ - .github/known-versions/versions.json > tmp.json && mv tmp.json .github/known-versions/versions.json - done - # Update GardenLinux versions from the build matrix - for row in $(echo "${BUILD_MATRIX}" | jq -r '.[] | "\(.gl_major)=\(.gl_version)"' | sort -u); do - gl_major="${row%%=*}" - gl_ver="${row#*=}" - jq --arg m "${gl_major}" --arg v "${gl_ver}" '.gardenlinux[$m] = $v' \ - .github/known-versions/versions.json > tmp.json && mv tmp.json .github/known-versions/versions.json - done - echo "Updated versions.json:" + # Build a completely fresh versions.json from current source data. + # This drops any SM or GL versions that are no longer active. + jq -n \ + --argjson sm "${ALL_SM}" \ + --argjson gl "${ALL_GL}" \ + '{ sapmachine: $sm, gardenlinux: $gl }' \ + > .github/known-versions/versions.json + echo "Overwritten versions.json with current source data:" cat .github/known-versions/versions.json # - name: Commit and push updated versions From f35b63c83651f70d5233df1db0dfdda32782dbb4 Mon Sep 17 00:00:00 2001 From: Raees Khan Date: Thu, 19 Mar 2026 14:15:35 +0100 Subject: [PATCH 08/49] ff --- .github/scripts/detect-new-versions.sh | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/.github/scripts/detect-new-versions.sh b/.github/scripts/detect-new-versions.sh index 425736a966e..b676bae33a2 100755 --- a/.github/scripts/detect-new-versions.sh +++ b/.github/scripts/detect-new-versions.sh @@ -149,23 +149,12 @@ echo "::endgroup::" # --------------------------------------------------------------------------- echo "::group::Building matrix" -# Collect ALL SM versions (known + current) -declare -A ALL_SM_VERSIONS -for major in ${KNOWN_SM_MAJORS}; do - ALL_SM_VERSIONS["${major}"]=$(jq -r --arg m "${major}" '.sapmachine[$m]' "${KNOWN_VERSIONS_FILE}") -done -for major in "${!CURRENT_SM_VERSIONS[@]}"; do - ALL_SM_VERSIONS["${major}"]="${CURRENT_SM_VERSIONS[$major]}" -done - -# Collect ALL GL versions (known + current, with current overriding known) -declare -A ALL_GL_VERSIONS -while IFS='=' read -r gl_major gl_ver; do - ALL_GL_VERSIONS["${gl_major}"]="${gl_ver}" -done < <(jq -r '.gardenlinux | to_entries[] | "\(.key)=\(.value)"' "${KNOWN_VERSIONS_FILE}") -for gl_major in "${!CURRENT_GL_VERSIONS[@]}"; do - ALL_GL_VERSIONS["${gl_major}"]="${CURRENT_GL_VERSIONS[$gl_major]}" -done +# Use ONLY the current versions from sources — not the known file. +# This ensures stale versions (no longer active) never appear in the matrix. +# shellcheck disable=SC2034 +declare -n ALL_SM_VERSIONS=CURRENT_SM_VERSIONS +# shellcheck disable=SC2034 +declare -n ALL_GL_VERSIONS=CURRENT_GL_VERSIONS MATRIX_JSON="[]" From 0e71307cb068dd9d05b27475bbff8121710059dd Mon Sep 17 00:00:00 2001 From: Raees Khan Date: Thu, 19 Mar 2026 14:18:29 +0100 Subject: [PATCH 09/49] l --- .../auto-detect-and-publish-gardenlinux.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/auto-detect-and-publish-gardenlinux.yml b/.github/workflows/auto-detect-and-publish-gardenlinux.yml index 40c1f4efe2c..01c19da0325 100644 --- a/.github/workflows/auto-detect-and-publish-gardenlinux.yml +++ b/.github/workflows/auto-detect-and-publish-gardenlinux.yml @@ -58,14 +58,14 @@ jobs: chmod +x .github/scripts/detect-new-versions.sh .github/scripts/detect-new-versions.sh - - name: Summary - run: | - echo "### Version Detection Results" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "- **Has new versions:** ${{ steps.detect.outputs.has_new_versions }}" >> $GITHUB_STEP_SUMMARY - echo "- **New SapMachine versions:** ${{ steps.detect.outputs.new_sm_versions }}" >> $GITHUB_STEP_SUMMARY - echo "- **New GardenLinux versions:** ${{ steps.detect.outputs.new_gl_versions }}" >> $GITHUB_STEP_SUMMARY - echo "- **Build matrix size:** $(echo '${{ steps.detect.outputs.build_matrix }}' | jq 'length')" >> $GITHUB_STEP_SUMMARY + # - name: Summary + # run: | + # echo "### Version Detection Results" >> $GITHUB_STEP_SUMMARY + # echo "" >> $GITHUB_STEP_SUMMARY + # echo "- **Has new versions:** ${{ steps.detect.outputs.has_new_versions }}" >> $GITHUB_STEP_SUMMARY + # echo "- **New SapMachine versions:** ${{ steps.detect.outputs.new_sm_versions }}" >> $GITHUB_STEP_SUMMARY + # echo "- **New GardenLinux versions:** ${{ steps.detect.outputs.new_gl_versions }}" >> $GITHUB_STEP_SUMMARY + # echo "- **Build matrix size:** $(echo '${{ steps.detect.outputs.build_matrix }}' | jq 'length')" >> $GITHUB_STEP_SUMMARY # ============================================================================ # Job 2: Commit the updated known-versions file back to the repo From e1e99b309336e03c1f1d134cf1db42000fc57a79 Mon Sep 17 00:00:00 2001 From: Raees Khan Date: Thu, 19 Mar 2026 14:21:06 +0100 Subject: [PATCH 10/49] gg --- .github/scripts/detect-new-versions.sh | 16 ++++++++-------- .../auto-detect-and-publish-gardenlinux.yml | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/scripts/detect-new-versions.sh b/.github/scripts/detect-new-versions.sh index b676bae33a2..e2eaf6dbd0e 100755 --- a/.github/scripts/detect-new-versions.sh +++ b/.github/scripts/detect-new-versions.sh @@ -243,24 +243,24 @@ fi ALL_SM_JSON='{}' for major in "${!CURRENT_SM_VERSIONS[@]}"; do ver="${CURRENT_SM_VERSIONS[$major]}" - ALL_SM_JSON=$(echo "${ALL_SM_JSON}" | jq --arg m "${major}" --arg v "${ver}" '.[$m] = $v') + ALL_SM_JSON=$(echo "${ALL_SM_JSON}" | jq -c --arg m "${major}" --arg v "${ver}" '.[$m] = $v') done ALL_GL_JSON='{}' for gl_major in "${!CURRENT_GL_VERSIONS[@]}"; do gl_ver="${CURRENT_GL_VERSIONS[$gl_major]}" - ALL_GL_JSON=$(echo "${ALL_GL_JSON}" | jq --arg m "${gl_major}" --arg v "${gl_ver}" '.[$m] = $v') + ALL_GL_JSON=$(echo "${ALL_GL_JSON}" | jq -c --arg m "${gl_major}" --arg v "${gl_ver}" '.[$m] = $v') done -# Write to GITHUB_OUTPUT (multi-line safe) +# Write to GITHUB_OUTPUT – all JSON values MUST be compact (single-line) if [[ -n "${GITHUB_OUTPUT:-}" ]]; then { echo "has_new_versions=${HAS_NEW}" - echo "new_sm_versions=${SM_OUT}" - echo "new_gl_versions=${GL_OUT}" - echo "build_matrix=${MATRIX_JSON}" - echo "all_sm_versions=${ALL_SM_JSON}" - echo "all_gl_versions=${ALL_GL_JSON}" + echo "new_sm_versions=$(echo "${SM_OUT}" | jq -c '.')" + echo "new_gl_versions=$(echo "${GL_OUT}" | jq -c '.')" + echo "build_matrix=$(echo "${MATRIX_JSON}" | jq -c '.')" + echo "all_sm_versions=$(echo "${ALL_SM_JSON}" | jq -c '.')" + echo "all_gl_versions=$(echo "${ALL_GL_JSON}" | jq -c '.')" } >> "${GITHUB_OUTPUT}" else # For local testing diff --git a/.github/workflows/auto-detect-and-publish-gardenlinux.yml b/.github/workflows/auto-detect-and-publish-gardenlinux.yml index 01c19da0325..40c1f4efe2c 100644 --- a/.github/workflows/auto-detect-and-publish-gardenlinux.yml +++ b/.github/workflows/auto-detect-and-publish-gardenlinux.yml @@ -58,14 +58,14 @@ jobs: chmod +x .github/scripts/detect-new-versions.sh .github/scripts/detect-new-versions.sh - # - name: Summary - # run: | - # echo "### Version Detection Results" >> $GITHUB_STEP_SUMMARY - # echo "" >> $GITHUB_STEP_SUMMARY - # echo "- **Has new versions:** ${{ steps.detect.outputs.has_new_versions }}" >> $GITHUB_STEP_SUMMARY - # echo "- **New SapMachine versions:** ${{ steps.detect.outputs.new_sm_versions }}" >> $GITHUB_STEP_SUMMARY - # echo "- **New GardenLinux versions:** ${{ steps.detect.outputs.new_gl_versions }}" >> $GITHUB_STEP_SUMMARY - # echo "- **Build matrix size:** $(echo '${{ steps.detect.outputs.build_matrix }}' | jq 'length')" >> $GITHUB_STEP_SUMMARY + - name: Summary + run: | + echo "### Version Detection Results" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "- **Has new versions:** ${{ steps.detect.outputs.has_new_versions }}" >> $GITHUB_STEP_SUMMARY + echo "- **New SapMachine versions:** ${{ steps.detect.outputs.new_sm_versions }}" >> $GITHUB_STEP_SUMMARY + echo "- **New GardenLinux versions:** ${{ steps.detect.outputs.new_gl_versions }}" >> $GITHUB_STEP_SUMMARY + echo "- **Build matrix size:** $(echo '${{ steps.detect.outputs.build_matrix }}' | jq 'length')" >> $GITHUB_STEP_SUMMARY # ============================================================================ # Job 2: Commit the updated known-versions file back to the repo From 134bdcf1bc500db2bfc3134fb93e36c4fc1d3818 Mon Sep 17 00:00:00 2001 From: Raees Khan Date: Thu, 19 Mar 2026 14:31:08 +0100 Subject: [PATCH 11/49] lll --- .../auto-detect-and-publish-gardenlinux.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/auto-detect-and-publish-gardenlinux.yml b/.github/workflows/auto-detect-and-publish-gardenlinux.yml index 40c1f4efe2c..0a4cafae7dd 100644 --- a/.github/workflows/auto-detect-and-publish-gardenlinux.yml +++ b/.github/workflows/auto-detect-and-publish-gardenlinux.yml @@ -19,7 +19,6 @@ on: schedule: - cron: '0 6 * * *' # Daily at 06:00 UTC workflow_dispatch: # Allow manual trigger - push: permissions: contents: write # To commit updated known-versions file @@ -100,13 +99,13 @@ jobs: echo "Overwritten versions.json with current source data:" cat .github/known-versions/versions.json - # - name: Commit and push updated versions - # run: | - # git config --local user.email "sapmachine@sap.com" - # git config --local user.name "SapMachine Github Actions Bot" - # git add .github/known-versions/versions.json - # git diff --cached --quiet || git commit -m "chore: update known SapMachine/GardenLinux versions [skip ci]" - # git push + - name: Commit and push updated versions + run: | + git config --local user.email "sapmachine@sap.com" + git config --local user.name "SapMachine Github Actions Bot" + git add .github/known-versions/versions.json + git diff --cached --quiet || git commit -m "Update known SapMachine/GardenLinux versions" + git push # ============================================================================ # Job 3: Build and publish container images (matrix strategy) From 7229fe0e20f8d70466b3d508f9bb77c283a3a30d Mon Sep 17 00:00:00 2001 From: SapMachine Github Actions Bot Date: Thu, 19 Mar 2026 15:42:16 +0000 Subject: [PATCH 12/49] Update known SapMachine/GardenLinux versions --- .github/known-versions/versions.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/known-versions/versions.json b/.github/known-versions/versions.json index bfb108ad437..3e166fe45f0 100644 --- a/.github/known-versions/versions.json +++ b/.github/known-versions/versions.json @@ -1,11 +1,12 @@ { "sapmachine": { - "17": "17.0.18", + "26": "26", + "25": "25.0.2", "21": "21.0.10.0.1", - "25": "25.0.2" + "17": "17.0.18" }, "gardenlinux": { - "1592": "1592.18", + "2150": "2150.0.0", "1877": "1877.13" } } From afb0d5477c420d97e85837a5007363f0aaf2324a Mon Sep 17 00:00:00 2001 From: Raees Khan Date: Fri, 20 Mar 2026 08:45:33 +0100 Subject: [PATCH 13/49] fixe --- .github/known-versions/versions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/known-versions/versions.json b/.github/known-versions/versions.json index 3e166fe45f0..a4bfbdfda85 100644 --- a/.github/known-versions/versions.json +++ b/.github/known-versions/versions.json @@ -2,7 +2,7 @@ "sapmachine": { "26": "26", "25": "25.0.2", - "21": "21.0.10.0.1", + "21": "21.0.9", "17": "17.0.18" }, "gardenlinux": { From 615d5ccabc6ad8e3b43ec9ddbbb806e0da00a17f Mon Sep 17 00:00:00 2001 From: SapMachine Github Actions Bot Date: Fri, 20 Mar 2026 07:46:34 +0000 Subject: [PATCH 14/49] Update known SapMachine/GardenLinux versions --- .github/known-versions/versions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/known-versions/versions.json b/.github/known-versions/versions.json index a4bfbdfda85..3e166fe45f0 100644 --- a/.github/known-versions/versions.json +++ b/.github/known-versions/versions.json @@ -2,7 +2,7 @@ "sapmachine": { "26": "26", "25": "25.0.2", - "21": "21.0.9", + "21": "21.0.10.0.1", "17": "17.0.18" }, "gardenlinux": { From 4184d4efa56db7b6c0aab81c4d4f6de4e549c384 Mon Sep 17 00:00:00 2001 From: Raees Khan Date: Fri, 20 Mar 2026 08:47:43 +0100 Subject: [PATCH 15/49] 555 --- .github/known-versions/versions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/known-versions/versions.json b/.github/known-versions/versions.json index 3e166fe45f0..ac5f2d5a4fc 100644 --- a/.github/known-versions/versions.json +++ b/.github/known-versions/versions.json @@ -7,6 +7,6 @@ }, "gardenlinux": { "2150": "2150.0.0", - "1877": "1877.13" + "1877": "1877.11" } } From e04cbd048836ba8bd6bb5b607e1cf031d5c0563d Mon Sep 17 00:00:00 2001 From: SapMachine Github Actions Bot Date: Fri, 20 Mar 2026 07:48:44 +0000 Subject: [PATCH 16/49] Update known SapMachine/GardenLinux versions --- .github/known-versions/versions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/known-versions/versions.json b/.github/known-versions/versions.json index ac5f2d5a4fc..3e166fe45f0 100644 --- a/.github/known-versions/versions.json +++ b/.github/known-versions/versions.json @@ -7,6 +7,6 @@ }, "gardenlinux": { "2150": "2150.0.0", - "1877": "1877.11" + "1877": "1877.13" } } From ca51b1f7a6336e92bf81c745b13aad046b4a10ea Mon Sep 17 00:00:00 2001 From: Raees Khan Date: Fri, 20 Mar 2026 08:50:31 +0100 Subject: [PATCH 17/49] 66 --- .github/known-versions/versions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/known-versions/versions.json b/.github/known-versions/versions.json index 3e166fe45f0..971591f5a5f 100644 --- a/.github/known-versions/versions.json +++ b/.github/known-versions/versions.json @@ -6,7 +6,7 @@ "17": "17.0.18" }, "gardenlinux": { - "2150": "2150.0.0", + "1158": "1158.1", "1877": "1877.13" } } From 145dc71862f32274c3cb486c0a39ce84223631b3 Mon Sep 17 00:00:00 2001 From: SapMachine Github Actions Bot Date: Fri, 20 Mar 2026 07:51:41 +0000 Subject: [PATCH 18/49] Update known SapMachine/GardenLinux versions --- .github/known-versions/versions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/known-versions/versions.json b/.github/known-versions/versions.json index 971591f5a5f..3e166fe45f0 100644 --- a/.github/known-versions/versions.json +++ b/.github/known-versions/versions.json @@ -6,7 +6,7 @@ "17": "17.0.18" }, "gardenlinux": { - "1158": "1158.1", + "2150": "2150.0.0", "1877": "1877.13" } } From bb4c85e88a0f49ed0d164e923961b90952804f3a Mon Sep 17 00:00:00 2001 From: Raees Khan Date: Fri, 20 Mar 2026 09:17:52 +0100 Subject: [PATCH 19/49] test it --- .../auto-detect-and-publish-gardenlinux.yml | 168 +++++++++--------- 1 file changed, 84 insertions(+), 84 deletions(-) diff --git a/.github/workflows/auto-detect-and-publish-gardenlinux.yml b/.github/workflows/auto-detect-and-publish-gardenlinux.yml index 0a4cafae7dd..089731907a7 100644 --- a/.github/workflows/auto-detect-and-publish-gardenlinux.yml +++ b/.github/workflows/auto-detect-and-publish-gardenlinux.yml @@ -67,7 +67,90 @@ jobs: echo "- **Build matrix size:** $(echo '${{ steps.detect.outputs.build_matrix }}' | jq 'length')" >> $GITHUB_STEP_SUMMARY # ============================================================================ - # Job 2: Commit the updated known-versions file back to the repo + # Job 2: Build and publish container images (matrix strategy) + # ============================================================================ + build-and-publish: + name: "Build SM ${{ matrix.combo.sm_major }} (${{ matrix.combo.sm_version }}) on GL ${{ matrix.combo.gl_major }} (${{ matrix.combo.gl_version }})" + needs: detect + if: needs.detect.outputs.has_new_versions == 'true' + runs-on: ubuntu-24.04 + strategy: + fail-fast: false + max-parallel: 4 + matrix: + combo: ${{ fromJson(needs.detect.outputs.build_matrix) }} + defaults: + run: + shell: bash + steps: + - name: Checkout repository + uses: actions/checkout@v6 + + - name: Install qemu dependency for multi-arch build + run: | + sudo apt-get update + sudo apt-get install -y qemu-user-static + + - name: Generate Dockerfiles + run: | + chmod +x .github/scripts/generate-dockerfile.sh + SM_MAJOR="${{ matrix.combo.sm_major }}" + SM_VERSION="${{ matrix.combo.sm_version }}" + GL_MAJOR="${{ matrix.combo.gl_major }}" + GL_VERSION="${{ matrix.combo.gl_version }}" + + for flavour in jdk jdk-headless jre jre-headless; do + .github/scripts/generate-dockerfile.sh \ + "${SM_MAJOR}" "${SM_VERSION}" "${GL_VERSION}" "${flavour}" \ + "build/${SM_MAJOR}/gardenlinux/${GL_MAJOR}/${flavour}" + done + + - name: Login to GHCR + run: | + podman login -u token -p ${{ github.token }} ghcr.io + + - name: Build and push multi-arch images + run: | + SM_FLAVOURS=(jdk jdk-headless jre jre-headless) + SM_REGISTRY="ghcr.io/sap/sapmachine" + SM_MAJOR="${{ matrix.combo.sm_major }}" + SM_VERSION="${{ matrix.combo.sm_version }}" + GL_MAJOR="${{ matrix.combo.gl_major }}" + GL_VERSION="${{ matrix.combo.gl_version }}" + + for sm_flvr in "${SM_FLAVOURS[@]}"; do + build_dir="build/${SM_MAJOR}/gardenlinux/${GL_MAJOR}/${sm_flvr}" + tag="${SM_MAJOR}-${sm_flvr}-gl-${GL_MAJOR}" + + echo "::group::Building ${SM_REGISTRY}:${tag}" + cd "${build_dir}" + + podman manifest create "${SM_REGISTRY}:${tag}" + # podman build --platform linux/amd64,linux/arm64 --manifest "${SM_REGISTRY}:${tag}" . + # podman manifest push "${SM_REGISTRY}:${tag}" + + echo "✅ Pushed ${SM_REGISTRY}:${tag}" + echo "::endgroup::" + + cd "${GITHUB_WORKSPACE}" + done + + - name: Summary + run: | + SM_MAJOR="${{ matrix.combo.sm_major }}" + SM_VERSION="${{ matrix.combo.sm_version }}" + GL_MAJOR="${{ matrix.combo.gl_major }}" + GL_VERSION="${{ matrix.combo.gl_version }}" + echo "### Published Images" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "Base: ghcr.io/gardenlinux/gardenlinux:${GL_VERSION}" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + for flvr in jdk jdk-headless jre jre-headless; do + echo "- \`ghcr.io/sap/sapmachine:${SM_MAJOR}-${flvr}-gl-${GL_MAJOR}\`" >> $GITHUB_STEP_SUMMARY + done + + # ============================================================================ + # Job 3: Commit the updated known-versions file back to the repo # ============================================================================ update-known-versions: name: Update known versions file @@ -106,86 +189,3 @@ jobs: git add .github/known-versions/versions.json git diff --cached --quiet || git commit -m "Update known SapMachine/GardenLinux versions" git push - - # ============================================================================ - # Job 3: Build and publish container images (matrix strategy) - # ============================================================================ - # build-and-publish: - # name: "Build SM ${{ matrix.combo.sm_major }} (${{ matrix.combo.sm_version }}) on GL ${{ matrix.combo.gl_major }} (${{ matrix.combo.gl_version }})" - # needs: detect - # if: needs.detect.outputs.has_new_versions == 'true' - # runs-on: ubuntu-24.04 - # strategy: - # fail-fast: false - # max-parallel: 4 - # matrix: - # combo: ${{ fromJson(needs.detect.outputs.build_matrix) }} - # defaults: - # run: - # shell: bash - # steps: - # - name: Checkout repository - # uses: actions/checkout@v6 - - # - name: Install qemu dependency for multi-arch build - # run: | - # sudo apt-get update - # sudo apt-get install -y qemu-user-static - - # - name: Generate Dockerfiles - # run: | - # chmod +x .github/scripts/generate-dockerfile.sh - # SM_MAJOR="${{ matrix.combo.sm_major }}" - # SM_VERSION="${{ matrix.combo.sm_version }}" - # GL_MAJOR="${{ matrix.combo.gl_major }}" - # GL_VERSION="${{ matrix.combo.gl_version }}" - - # for flavour in jdk jdk-headless jre jre-headless; do - # .github/scripts/generate-dockerfile.sh \ - # "${SM_MAJOR}" "${SM_VERSION}" "${GL_VERSION}" "${flavour}" \ - # "build/${SM_MAJOR}/gardenlinux/${GL_MAJOR}/${flavour}" - # done - - # - name: Login to GHCR - # run: | - # podman login -u token -p ${{ github.token }} ghcr.io - - # - name: Build and push multi-arch images - # run: | - # SM_FLAVOURS=(jdk jdk-headless jre jre-headless) - # SM_REGISTRY="ghcr.io/sap/sapmachine" - # SM_MAJOR="${{ matrix.combo.sm_major }}" - # SM_VERSION="${{ matrix.combo.sm_version }}" - # GL_MAJOR="${{ matrix.combo.gl_major }}" - # GL_VERSION="${{ matrix.combo.gl_version }}" - - # for sm_flvr in "${SM_FLAVOURS[@]}"; do - # build_dir="build/${SM_MAJOR}/gardenlinux/${GL_MAJOR}/${sm_flvr}" - # tag="${SM_MAJOR}-${sm_flvr}-gl-${GL_MAJOR}" - - # echo "::group::Building ${SM_REGISTRY}:${tag}" - # cd "${build_dir}" - - # podman manifest create "${SM_REGISTRY}:${tag}" - # podman build --platform linux/amd64,linux/arm64 --manifest "${SM_REGISTRY}:${tag}" . - # podman manifest push "${SM_REGISTRY}:${tag}" - - # echo "✅ Pushed ${SM_REGISTRY}:${tag}" - # echo "::endgroup::" - - # cd "${GITHUB_WORKSPACE}" - # done - - # - name: Summary - # run: | - # SM_MAJOR="${{ matrix.combo.sm_major }}" - # SM_VERSION="${{ matrix.combo.sm_version }}" - # GL_MAJOR="${{ matrix.combo.gl_major }}" - # GL_VERSION="${{ matrix.combo.gl_version }}" - # echo "### Published Images" >> $GITHUB_STEP_SUMMARY - # echo "" >> $GITHUB_STEP_SUMMARY - # echo "Base: ghcr.io/gardenlinux/gardenlinux:${GL_VERSION}" >> $GITHUB_STEP_SUMMARY - # echo "" >> $GITHUB_STEP_SUMMARY - # for flvr in jdk jdk-headless jre jre-headless; do - # echo "- \`ghcr.io/sap/sapmachine:${SM_MAJOR}-${flvr}-gl-${GL_MAJOR}\`" >> $GITHUB_STEP_SUMMARY - # done From f1a769465c78c50c74c3a8d35757f6359276eaca Mon Sep 17 00:00:00 2001 From: Raees Khan Date: Fri, 20 Mar 2026 09:23:50 +0100 Subject: [PATCH 20/49] pp --- .github/known-versions/versions.json | 2 +- .github/workflows/auto-detect-and-publish-gardenlinux.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/known-versions/versions.json b/.github/known-versions/versions.json index 3e166fe45f0..654038cbfc4 100644 --- a/.github/known-versions/versions.json +++ b/.github/known-versions/versions.json @@ -3,7 +3,7 @@ "26": "26", "25": "25.0.2", "21": "21.0.10.0.1", - "17": "17.0.18" + "17": "17.0.17" }, "gardenlinux": { "2150": "2150.0.0", diff --git a/.github/workflows/auto-detect-and-publish-gardenlinux.yml b/.github/workflows/auto-detect-and-publish-gardenlinux.yml index 089731907a7..ef4c576a8b9 100644 --- a/.github/workflows/auto-detect-and-publish-gardenlinux.yml +++ b/.github/workflows/auto-detect-and-publish-gardenlinux.yml @@ -153,8 +153,8 @@ jobs: # Job 3: Commit the updated known-versions file back to the repo # ============================================================================ update-known-versions: - name: Update known versions file - #needs: [detect, build-and-publish] + #name: Update known versions file + needs: [detect, build-and-publish] needs: [detect] if: needs.detect.outputs.has_new_versions == 'true' runs-on: ubuntu-24.04 From e81e836f8ecedf024405619bed587376dbf3c863 Mon Sep 17 00:00:00 2001 From: Raees Khan Date: Fri, 20 Mar 2026 09:24:07 +0100 Subject: [PATCH 21/49] oooo --- .github/workflows/auto-detect-and-publish-gardenlinux.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/auto-detect-and-publish-gardenlinux.yml b/.github/workflows/auto-detect-and-publish-gardenlinux.yml index ef4c576a8b9..c00d313ce36 100644 --- a/.github/workflows/auto-detect-and-publish-gardenlinux.yml +++ b/.github/workflows/auto-detect-and-publish-gardenlinux.yml @@ -153,9 +153,9 @@ jobs: # Job 3: Commit the updated known-versions file back to the repo # ============================================================================ update-known-versions: - #name: Update known versions file + name: Update known versions file needs: [detect, build-and-publish] - needs: [detect] + #needs: [detect] if: needs.detect.outputs.has_new_versions == 'true' runs-on: ubuntu-24.04 steps: From 5118ae7a8a1a0715a9438a9db96c32899192d5ee Mon Sep 17 00:00:00 2001 From: SapMachine Github Actions Bot Date: Fri, 20 Mar 2026 08:25:48 +0000 Subject: [PATCH 22/49] Update known SapMachine/GardenLinux versions --- .github/known-versions/versions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/known-versions/versions.json b/.github/known-versions/versions.json index 654038cbfc4..3e166fe45f0 100644 --- a/.github/known-versions/versions.json +++ b/.github/known-versions/versions.json @@ -3,7 +3,7 @@ "26": "26", "25": "25.0.2", "21": "21.0.10.0.1", - "17": "17.0.17" + "17": "17.0.18" }, "gardenlinux": { "2150": "2150.0.0", From 79771628d02c8ff08a197f86065552e65cc20a42 Mon Sep 17 00:00:00 2001 From: Raees Khan Date: Fri, 20 Mar 2026 09:53:00 +0100 Subject: [PATCH 23/49] 99 --- .github/workflows/auto-detect-and-publish-gardenlinux.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/auto-detect-and-publish-gardenlinux.yml b/.github/workflows/auto-detect-and-publish-gardenlinux.yml index c00d313ce36..4a7084961a0 100644 --- a/.github/workflows/auto-detect-and-publish-gardenlinux.yml +++ b/.github/workflows/auto-detect-and-publish-gardenlinux.yml @@ -126,7 +126,7 @@ jobs: cd "${build_dir}" podman manifest create "${SM_REGISTRY}:${tag}" - # podman build --platform linux/amd64,linux/arm64 --manifest "${SM_REGISTRY}:${tag}" . + podman build --platform linux/amd64,linux/arm64 --manifest "${SM_REGISTRY}:${tag}" . # podman manifest push "${SM_REGISTRY}:${tag}" echo "✅ Pushed ${SM_REGISTRY}:${tag}" @@ -155,7 +155,6 @@ jobs: update-known-versions: name: Update known versions file needs: [detect, build-and-publish] - #needs: [detect] if: needs.detect.outputs.has_new_versions == 'true' runs-on: ubuntu-24.04 steps: From f47e08bc4392fb04c13683d55781b5e0932fdb78 Mon Sep 17 00:00:00 2001 From: Raees Khan Date: Fri, 20 Mar 2026 09:56:49 +0100 Subject: [PATCH 24/49] 369 --- .github/known-versions/versions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/known-versions/versions.json b/.github/known-versions/versions.json index 3e166fe45f0..654038cbfc4 100644 --- a/.github/known-versions/versions.json +++ b/.github/known-versions/versions.json @@ -3,7 +3,7 @@ "26": "26", "25": "25.0.2", "21": "21.0.10.0.1", - "17": "17.0.18" + "17": "17.0.17" }, "gardenlinux": { "2150": "2150.0.0", From df6ddf2836ca324018a811afab4871b93930cd56 Mon Sep 17 00:00:00 2001 From: SapMachine Github Actions Bot Date: Fri, 20 Mar 2026 09:02:31 +0000 Subject: [PATCH 25/49] Update known SapMachine/GardenLinux versions --- .github/known-versions/versions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/known-versions/versions.json b/.github/known-versions/versions.json index 654038cbfc4..3e166fe45f0 100644 --- a/.github/known-versions/versions.json +++ b/.github/known-versions/versions.json @@ -3,7 +3,7 @@ "26": "26", "25": "25.0.2", "21": "21.0.10.0.1", - "17": "17.0.17" + "17": "17.0.18" }, "gardenlinux": { "2150": "2150.0.0", From dcfa14a678966a706db224469efc1c0cd53a8640 Mon Sep 17 00:00:00 2001 From: Raees Khan Date: Fri, 20 Mar 2026 10:36:26 +0100 Subject: [PATCH 26/49] 88 --- .github/workflows/auto-detect-and-publish-gardenlinux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/auto-detect-and-publish-gardenlinux.yml b/.github/workflows/auto-detect-and-publish-gardenlinux.yml index 4a7084961a0..9ac33245d83 100644 --- a/.github/workflows/auto-detect-and-publish-gardenlinux.yml +++ b/.github/workflows/auto-detect-and-publish-gardenlinux.yml @@ -17,7 +17,7 @@ name: Auto-detect and publish SapMachine GardenLinux images on: schedule: - - cron: '0 6 * * *' # Daily at 06:00 UTC + - cron: '0 6 * * *' # Daily at 06:00 UTC workflow_dispatch: # Allow manual trigger permissions: From f8b10b21839e1247effd9ee23b03671ed8b39458 Mon Sep 17 00:00:00 2001 From: Raees Khan Date: Fri, 20 Mar 2026 15:14:27 +0100 Subject: [PATCH 27/49] jkjk --- .../auto-detect-and-publish-gardenlinux.yml | 55 ++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/.github/workflows/auto-detect-and-publish-gardenlinux.yml b/.github/workflows/auto-detect-and-publish-gardenlinux.yml index 9ac33245d83..ccd0561f87e 100644 --- a/.github/workflows/auto-detect-and-publish-gardenlinux.yml +++ b/.github/workflows/auto-detect-and-publish-gardenlinux.yml @@ -58,7 +58,7 @@ jobs: .github/scripts/detect-new-versions.sh - name: Summary - run: | + un: | echo "### Version Detection Results" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY echo "- **Has new versions:** ${{ steps.detect.outputs.has_new_versions }}" >> $GITHUB_STEP_SUMMARY @@ -188,3 +188,56 @@ jobs: git add .github/known-versions/versions.json git diff --cached --quiet || git commit -m "Update known SapMachine/GardenLinux versions" git push + + # ============================================================================ + # Job 4: Notify on failure – send email if any of the 3 jobs failed + # ============================================================================ + notify-on-failure: + name: Notify on failure + needs: [detect, build-and-publish, update-known-versions] + if: >- + always() && + (needs.detect.result == 'failure' + || needs.build-and-publish.result == 'failure' + || needs.update-known-versions.result == 'failure') + runs-on: ubuntu-24.04 + steps: + - name: Collect failure details + id: failure-info + run: | + RUN_URL="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" + + MSG="The following jobs failed in workflow run ${RUN_URL} :" + MSG="${MSG}\n" + + if [[ "${{ needs.detect.result }}" == "failure" ]]; then + MSG="${MSG}\n - detect (version detection)" + fi + if [[ "${{ needs.build-and-publish.result }}" == "failure" ]]; then + MSG="${MSG}\n - build-and-publish (image build / push)" + fi + if [[ "${{ needs.update-known-versions.result }}" == "failure" ]]; then + MSG="${MSG}\n - update-known-versions (git commit / push)" + fi + + MSG="${MSG}\n\nPlease check the workflow run for details:\n${RUN_URL}" + + # Store for next step (escape newlines for GITHUB_OUTPUT) + echo "run_url=${RUN_URL}" >> "${GITHUB_OUTPUT}" + EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) + echo "message<<${EOF}" >> "${GITHUB_OUTPUT}" + echo -e "${MSG}" >> "${GITHUB_OUTPUT}" + echo "${EOF}" >> "${GITHUB_OUTPUT}" + + - name: Send failure notification email + uses: dawidd6/action-send-mail@v3 + with: + server_address: ${{ secrets.SMTP_SERVER }} + server_port: ${{ secrets.SMTP_PORT }} + username: ${{ secrets.SMTP_USERNAME }} + password: ${{ secrets.SMTP_PASSWORD }} + subject: "❌ GardenLinux image pipeline failed – ${{ github.repository }}" + to: ${{ secrets.NOTIFY_EMAIL_RECIPIENTS }} + from: "GitHub Actions <${{ secrets.SMTP_USERNAME }}>" + content_type: text/plain + body: ${{ steps.failure-info.outputs.message }} From b2f0170ca1f52938af529564fbd432b7a865e75d Mon Sep 17 00:00:00 2001 From: Raees Khan Date: Fri, 20 Mar 2026 15:15:45 +0100 Subject: [PATCH 28/49] op --- .github/known-versions/versions.json | 2 +- .github/workflows/auto-detect-and-publish-gardenlinux.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/known-versions/versions.json b/.github/known-versions/versions.json index 3e166fe45f0..8e85538dd74 100644 --- a/.github/known-versions/versions.json +++ b/.github/known-versions/versions.json @@ -1,4 +1,4 @@ -{ +{error "sapmachine": { "26": "26", "25": "25.0.2", diff --git a/.github/workflows/auto-detect-and-publish-gardenlinux.yml b/.github/workflows/auto-detect-and-publish-gardenlinux.yml index ccd0561f87e..32f6ff99ee9 100644 --- a/.github/workflows/auto-detect-and-publish-gardenlinux.yml +++ b/.github/workflows/auto-detect-and-publish-gardenlinux.yml @@ -58,7 +58,7 @@ jobs: .github/scripts/detect-new-versions.sh - name: Summary - un: | + run: | echo "### Version Detection Results" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY echo "- **Has new versions:** ${{ steps.detect.outputs.has_new_versions }}" >> $GITHUB_STEP_SUMMARY From 5404a37e982a317a90380054080baa857209bf7c Mon Sep 17 00:00:00 2001 From: Raees Khan Date: Fri, 20 Mar 2026 16:07:13 +0100 Subject: [PATCH 29/49] tex --- .github/workflows/auto-detect-and-publish-gardenlinux.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/auto-detect-and-publish-gardenlinux.yml b/.github/workflows/auto-detect-and-publish-gardenlinux.yml index 32f6ff99ee9..a021dbb47a2 100644 --- a/.github/workflows/auto-detect-and-publish-gardenlinux.yml +++ b/.github/workflows/auto-detect-and-publish-gardenlinux.yml @@ -230,7 +230,7 @@ jobs: echo "${EOF}" >> "${GITHUB_OUTPUT}" - name: Send failure notification email - uses: dawidd6/action-send-mail@v3 + uses: dawidd6/action-send-mail@v16 with: server_address: ${{ secrets.SMTP_SERVER }} server_port: ${{ secrets.SMTP_PORT }} @@ -239,5 +239,4 @@ jobs: subject: "❌ GardenLinux image pipeline failed – ${{ github.repository }}" to: ${{ secrets.NOTIFY_EMAIL_RECIPIENTS }} from: "GitHub Actions <${{ secrets.SMTP_USERNAME }}>" - content_type: text/plain body: ${{ steps.failure-info.outputs.message }} From 496966d922bf90de7ed9e926e9d30c4f6f2b668d Mon Sep 17 00:00:00 2001 From: Raees Khan Date: Fri, 20 Mar 2026 16:35:10 +0100 Subject: [PATCH 30/49] CVCV --- .github/workflows/auto-detect-and-publish-gardenlinux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/auto-detect-and-publish-gardenlinux.yml b/.github/workflows/auto-detect-and-publish-gardenlinux.yml index a021dbb47a2..536b74cf6f1 100644 --- a/.github/workflows/auto-detect-and-publish-gardenlinux.yml +++ b/.github/workflows/auto-detect-and-publish-gardenlinux.yml @@ -238,5 +238,5 @@ jobs: password: ${{ secrets.SMTP_PASSWORD }} subject: "❌ GardenLinux image pipeline failed – ${{ github.repository }}" to: ${{ secrets.NOTIFY_EMAIL_RECIPIENTS }} - from: "GitHub Actions <${{ secrets.SMTP_USERNAME }}>" + from: "GitHub Actions <${{ secrets.SMTP_FROM_ADDRESS }}>" body: ${{ steps.failure-info.outputs.message }} From 4325c484e6104ac355db5450320b2310c5158ad0 Mon Sep 17 00:00:00 2001 From: Raees Khan Date: Fri, 20 Mar 2026 16:45:51 +0100 Subject: [PATCH 31/49] xxx --- .github/known-versions/versions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/known-versions/versions.json b/.github/known-versions/versions.json index 8e85538dd74..3e166fe45f0 100644 --- a/.github/known-versions/versions.json +++ b/.github/known-versions/versions.json @@ -1,4 +1,4 @@ -{error +{ "sapmachine": { "26": "26", "25": "25.0.2", From 034db38ff554a85fc5cf5a9b92c6f9db2a2afcd3 Mon Sep 17 00:00:00 2001 From: Raees Khan Date: Mon, 23 Mar 2026 11:22:21 +0100 Subject: [PATCH 32/49] kk --- .github/scripts/detect-new-versions.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/scripts/detect-new-versions.sh b/.github/scripts/detect-new-versions.sh index e2eaf6dbd0e..0df94785467 100755 --- a/.github/scripts/detect-new-versions.sh +++ b/.github/scripts/detect-new-versions.sh @@ -61,6 +61,7 @@ echo "::endgroup::" echo "::group::Fetching GardenLinux active minor versions" # Use the glrd container with JSON output to get all active minor releases, # then extract the latest (highest) minor version per major. +# TODO: we can improve this part: https://github.com/gardenlinux/glrd/issues/20 GL_JSON=$(docker run --rm ghcr.io/gardenlinux/glrd "glrd --active --type minor --output-format json" 2>/dev/null || echo '{"releases":[]}') # Build a map: gl_major → latest minor version string (e.g. "1592" → "1592.18") From b4851a48b5b007fffda197c2b93584ed87317226 Mon Sep 17 00:00:00 2001 From: Raees Khan Date: Mon, 23 Mar 2026 11:44:16 +0100 Subject: [PATCH 33/49] pp --- .github/scripts/detect-new-versions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/detect-new-versions.sh b/.github/scripts/detect-new-versions.sh index 0df94785467..5a70579a28f 100755 --- a/.github/scripts/detect-new-versions.sh +++ b/.github/scripts/detect-new-versions.sh @@ -34,7 +34,7 @@ cat "${KNOWN_VERSIONS_FILE}" echo "" echo "::endgroup::" -KNOWN_SM_MAJORS=$(jq -r '.sapmachine | keys[]' "${KNOWN_VERSIONS_FILE}") +#KNOWN_SM_MAJORS=$(jq -r '.sapmachine | keys[]' "${KNOWN_VERSIONS_FILE}") # --------------------------------------------------------------------------- # 2. Fetch current SapMachine GA versions From f8c54a1535ad675c087589dc345ad0086fe28522 Mon Sep 17 00:00:00 2001 From: Raees Khan Date: Mon, 23 Mar 2026 14:12:21 +0100 Subject: [PATCH 34/49] mm --- .github/scripts/detect-new-versions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/detect-new-versions.sh b/.github/scripts/detect-new-versions.sh index 5a70579a28f..8dfa3d494c4 100755 --- a/.github/scripts/detect-new-versions.sh +++ b/.github/scripts/detect-new-versions.sh @@ -240,7 +240,7 @@ if [[ ${#NEW_GL_ITEMS[@]} -gt 0 ]]; then done fi -# Build full current-state JSON maps (for overriding versions.json in Job 2) +# Build full current-state JSON maps (for overriding versions.json in Job 3) ALL_SM_JSON='{}' for major in "${!CURRENT_SM_VERSIONS[@]}"; do ver="${CURRENT_SM_VERSIONS[$major]}" From a9c712cb842baae5a594b4d7e7e5557cc550fa30 Mon Sep 17 00:00:00 2001 From: Raees Khan Date: Mon, 23 Mar 2026 14:28:53 +0100 Subject: [PATCH 35/49] uu --- .../auto-detect-and-publish-gardenlinux.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/auto-detect-and-publish-gardenlinux.yml b/.github/workflows/auto-detect-and-publish-gardenlinux.yml index 536b74cf6f1..f0b9ef3b647 100644 --- a/.github/workflows/auto-detect-and-publish-gardenlinux.yml +++ b/.github/workflows/auto-detect-and-publish-gardenlinux.yml @@ -126,7 +126,7 @@ jobs: cd "${build_dir}" podman manifest create "${SM_REGISTRY}:${tag}" - podman build --platform linux/amd64,linux/arm64 --manifest "${SM_REGISTRY}:${tag}" . + # podman build --platform linux/amd64,linux/arm64 --manifest "${SM_REGISTRY}:${tag}" . # podman manifest push "${SM_REGISTRY}:${tag}" echo "✅ Pushed ${SM_REGISTRY}:${tag}" @@ -173,11 +173,11 @@ jobs: run: | # Build a completely fresh versions.json from current source data. # This drops any SM or GL versions that are no longer active. - jq -n \ - --argjson sm "${ALL_SM}" \ - --argjson gl "${ALL_GL}" \ - '{ sapmachine: $sm, gardenlinux: $gl }' \ - > .github/known-versions/versions.json + #jq -n \ + # --argjson sm "${ALL_SM}" \ + # --argjson gl "${ALL_GL}" \ + # '{ sapmachine: $sm, gardenlinux: $gl }' \ + # > .github/known-versions/versions.json echo "Overwritten versions.json with current source data:" cat .github/known-versions/versions.json From e0e20794e47489a82a139a68bffd26240314fcfa Mon Sep 17 00:00:00 2001 From: Raees Khan Date: Mon, 23 Mar 2026 14:29:14 +0100 Subject: [PATCH 36/49] oo --- .github/known-versions/versions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/known-versions/versions.json b/.github/known-versions/versions.json index 3e166fe45f0..8f08d963a26 100644 --- a/.github/known-versions/versions.json +++ b/.github/known-versions/versions.json @@ -7,6 +7,6 @@ }, "gardenlinux": { "2150": "2150.0.0", - "1877": "1877.13" + "1877": "1877.12" } } From 024ceca11244ca3b487e8dcc6fc16d51f45d162b Mon Sep 17 00:00:00 2001 From: Raees Khan Date: Mon, 23 Mar 2026 14:59:11 +0100 Subject: [PATCH 37/49] popo --- .../workflows/auto-detect-and-publish-gardenlinux.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/auto-detect-and-publish-gardenlinux.yml b/.github/workflows/auto-detect-and-publish-gardenlinux.yml index f0b9ef3b647..78b94ce5d6e 100644 --- a/.github/workflows/auto-detect-and-publish-gardenlinux.yml +++ b/.github/workflows/auto-detect-and-publish-gardenlinux.yml @@ -173,11 +173,11 @@ jobs: run: | # Build a completely fresh versions.json from current source data. # This drops any SM or GL versions that are no longer active. - #jq -n \ - # --argjson sm "${ALL_SM}" \ - # --argjson gl "${ALL_GL}" \ - # '{ sapmachine: $sm, gardenlinux: $gl }' \ - # > .github/known-versions/versions.json + jq -n \ + --argjson sm "${ALL_SM}" \ + --argjson gl "${ALL_GL}" \ + '{ sapmachine: $sm, gardenlinux: $gl }' \ + > .github/known-versions/versions.json echo "Overwritten versions.json with current source data:" cat .github/known-versions/versions.json From ed33a76f266bb8a9f3a925c5bd3cf15833fb9640 Mon Sep 17 00:00:00 2001 From: SapMachine Github Actions Bot Date: Mon, 23 Mar 2026 14:03:57 +0000 Subject: [PATCH 38/49] Update known SapMachine/GardenLinux versions --- .github/known-versions/versions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/known-versions/versions.json b/.github/known-versions/versions.json index 8f08d963a26..52089b4e3d8 100644 --- a/.github/known-versions/versions.json +++ b/.github/known-versions/versions.json @@ -7,6 +7,6 @@ }, "gardenlinux": { "2150": "2150.0.0", - "1877": "1877.12" + "1877": "1877.14" } } From 6e8f0fd5b1029577bb9fb27dfc37a30720949ddd Mon Sep 17 00:00:00 2001 From: Raees Khan Date: Tue, 24 Mar 2026 09:30:43 +0100 Subject: [PATCH 39/49] oo --- .github/known-versions/versions.json | 2 +- .github/scripts/detect-new-versions.sh | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/known-versions/versions.json b/.github/known-versions/versions.json index 52089b4e3d8..26ed085d83c 100644 --- a/.github/known-versions/versions.json +++ b/.github/known-versions/versions.json @@ -3,7 +3,7 @@ "26": "26", "25": "25.0.2", "21": "21.0.10.0.1", - "17": "17.0.18" + "17": "17.0.17" }, "gardenlinux": { "2150": "2150.0.0", diff --git a/.github/scripts/detect-new-versions.sh b/.github/scripts/detect-new-versions.sh index 8dfa3d494c4..f6b5cb01c45 100755 --- a/.github/scripts/detect-new-versions.sh +++ b/.github/scripts/detect-new-versions.sh @@ -61,7 +61,6 @@ echo "::endgroup::" echo "::group::Fetching GardenLinux active minor versions" # Use the glrd container with JSON output to get all active minor releases, # then extract the latest (highest) minor version per major. -# TODO: we can improve this part: https://github.com/gardenlinux/glrd/issues/20 GL_JSON=$(docker run --rm ghcr.io/gardenlinux/glrd "glrd --active --type minor --output-format json" 2>/dev/null || echo '{"releases":[]}') # Build a map: gl_major → latest minor version string (e.g. "1592" → "1592.18") From 0f3486c44cc846928c6eeddc9ae0a817360c2f3f Mon Sep 17 00:00:00 2001 From: SapMachine Github Actions Bot Date: Tue, 24 Mar 2026 08:37:41 +0000 Subject: [PATCH 40/49] Update known SapMachine/GardenLinux versions --- .github/known-versions/versions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/known-versions/versions.json b/.github/known-versions/versions.json index 26ed085d83c..52089b4e3d8 100644 --- a/.github/known-versions/versions.json +++ b/.github/known-versions/versions.json @@ -3,7 +3,7 @@ "26": "26", "25": "25.0.2", "21": "21.0.10.0.1", - "17": "17.0.17" + "17": "17.0.18" }, "gardenlinux": { "2150": "2150.0.0", From 574f3e669bb044eb3063b04759420221f003310a Mon Sep 17 00:00:00 2001 From: Raees Khan Date: Tue, 24 Mar 2026 14:23:20 +0100 Subject: [PATCH 41/49] cc --- .github/known-versions/versions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/known-versions/versions.json b/.github/known-versions/versions.json index 52089b4e3d8..fa05e79e17a 100644 --- a/.github/known-versions/versions.json +++ b/.github/known-versions/versions.json @@ -7,6 +7,6 @@ }, "gardenlinux": { "2150": "2150.0.0", - "1877": "1877.14" + "1877": "1877.99" } } From 097fd86ca9218bf194328ae0e4fae52f439c4707 Mon Sep 17 00:00:00 2001 From: SapMachine Github Actions Bot Date: Tue, 24 Mar 2026 13:24:57 +0000 Subject: [PATCH 42/49] Update known SapMachine/GardenLinux versions --- .github/known-versions/versions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/known-versions/versions.json b/.github/known-versions/versions.json index fa05e79e17a..52089b4e3d8 100644 --- a/.github/known-versions/versions.json +++ b/.github/known-versions/versions.json @@ -7,6 +7,6 @@ }, "gardenlinux": { "2150": "2150.0.0", - "1877": "1877.99" + "1877": "1877.14" } } From 17470cfb9bde725b46c640f366cb983470debbd4 Mon Sep 17 00:00:00 2001 From: Raees Khan Date: Tue, 24 Mar 2026 14:29:41 +0100 Subject: [PATCH 43/49] popo --- .github/known-versions/versions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/known-versions/versions.json b/.github/known-versions/versions.json index 52089b4e3d8..4c8aba3bcf2 100644 --- a/.github/known-versions/versions.json +++ b/.github/known-versions/versions.json @@ -6,7 +6,7 @@ "17": "17.0.18" }, "gardenlinux": { - "2150": "2150.0.0", + "2150": "2150.0", "1877": "1877.14" } } From e79f77a51fef79843d132ad719020798d2c87998 Mon Sep 17 00:00:00 2001 From: SapMachine Github Actions Bot Date: Tue, 24 Mar 2026 13:31:16 +0000 Subject: [PATCH 44/49] Update known SapMachine/GardenLinux versions --- .github/known-versions/versions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/known-versions/versions.json b/.github/known-versions/versions.json index 4c8aba3bcf2..52089b4e3d8 100644 --- a/.github/known-versions/versions.json +++ b/.github/known-versions/versions.json @@ -6,7 +6,7 @@ "17": "17.0.18" }, "gardenlinux": { - "2150": "2150.0", + "2150": "2150.0.0", "1877": "1877.14" } } From f405e898e5f9e194ee0536bf11defdedf9bdf5cd Mon Sep 17 00:00:00 2001 From: Raees Khan Date: Tue, 24 Mar 2026 14:32:55 +0100 Subject: [PATCH 45/49] Real Push of 2150 --- .github/known-versions/versions.json | 2 +- .github/workflows/auto-detect-and-publish-gardenlinux.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/known-versions/versions.json b/.github/known-versions/versions.json index 52089b4e3d8..376eb03b417 100644 --- a/.github/known-versions/versions.json +++ b/.github/known-versions/versions.json @@ -6,7 +6,7 @@ "17": "17.0.18" }, "gardenlinux": { - "2150": "2150.0.0", + "2150": "2150", "1877": "1877.14" } } diff --git a/.github/workflows/auto-detect-and-publish-gardenlinux.yml b/.github/workflows/auto-detect-and-publish-gardenlinux.yml index 78b94ce5d6e..8c68001a309 100644 --- a/.github/workflows/auto-detect-and-publish-gardenlinux.yml +++ b/.github/workflows/auto-detect-and-publish-gardenlinux.yml @@ -126,8 +126,8 @@ jobs: cd "${build_dir}" podman manifest create "${SM_REGISTRY}:${tag}" - # podman build --platform linux/amd64,linux/arm64 --manifest "${SM_REGISTRY}:${tag}" . - # podman manifest push "${SM_REGISTRY}:${tag}" + podman build --platform linux/amd64,linux/arm64 --manifest "${SM_REGISTRY}:${tag}" . + podman manifest push "${SM_REGISTRY}:${tag}" echo "✅ Pushed ${SM_REGISTRY}:${tag}" echo "::endgroup::" From 80bda84d16bb904eb7dea254e7b416dff58368e8 Mon Sep 17 00:00:00 2001 From: Raees Khan Date: Tue, 24 Mar 2026 14:47:59 +0100 Subject: [PATCH 46/49] 9090 --- .github/known-versions/versions.json | 2 +- .../auto-detect-and-publish-gardenlinux.yml | 30 ++++++++++++++----- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/.github/known-versions/versions.json b/.github/known-versions/versions.json index 376eb03b417..e7a9b83e8ec 100644 --- a/.github/known-versions/versions.json +++ b/.github/known-versions/versions.json @@ -6,7 +6,7 @@ "17": "17.0.18" }, "gardenlinux": { - "2150": "2150", + "2150": "2150.0.", "1877": "1877.14" } } diff --git a/.github/workflows/auto-detect-and-publish-gardenlinux.yml b/.github/workflows/auto-detect-and-publish-gardenlinux.yml index 8c68001a309..cc985018234 100644 --- a/.github/workflows/auto-detect-and-publish-gardenlinux.yml +++ b/.github/workflows/auto-detect-and-publish-gardenlinux.yml @@ -120,18 +120,29 @@ jobs: for sm_flvr in "${SM_FLAVOURS[@]}"; do build_dir="build/${SM_MAJOR}/gardenlinux/${GL_MAJOR}/${sm_flvr}" - tag="${SM_MAJOR}-${sm_flvr}-gl-${GL_MAJOR}" + local_manifest="localhost/sapmachine-${SM_MAJOR}-${sm_flvr}-gl-${GL_MAJOR}" - echo "::group::Building ${SM_REGISTRY}:${tag}" + TAGS=( + "${SM_MAJOR}-${sm_flvr}-gl" + "${SM_VERSION}-${sm_flvr}-gl" + "${SM_MAJOR}-${sm_flvr}-gl-${GL_MAJOR}" + "${SM_MAJOR}-${sm_flvr}-gl-${GL_VERSION}" + "${SM_VERSION}-${sm_flvr}-gl-${GL_MAJOR}" + "${SM_VERSION}-${sm_flvr}-gl-${GL_VERSION}" + ) + + echo "::group::Building ${sm_flvr} (SM ${SM_MAJOR} / GL ${GL_MAJOR})" cd "${build_dir}" - podman manifest create "${SM_REGISTRY}:${tag}" - podman build --platform linux/amd64,linux/arm64 --manifest "${SM_REGISTRY}:${tag}" . - podman manifest push "${SM_REGISTRY}:${tag}" + podman manifest create "${local_manifest}" + # podman build --platform linux/amd64,linux/arm64 --manifest "${local_manifest}" . - echo "✅ Pushed ${SM_REGISTRY}:${tag}" - echo "::endgroup::" + for tag in "${TAGS[@]}"; do + # podman manifest push "${local_manifest}" "${SM_REGISTRY}:${tag}" + echo "✅ Pushed ${SM_REGISTRY}:${tag}" + done + echo "::endgroup::" cd "${GITHUB_WORKSPACE}" done @@ -146,7 +157,12 @@ jobs: echo "Base: ghcr.io/gardenlinux/gardenlinux:${GL_VERSION}" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY for flvr in jdk jdk-headless jre jre-headless; do + echo "- \`ghcr.io/sap/sapmachine:${SM_MAJOR}-${flvr}-gl\`" >> $GITHUB_STEP_SUMMARY + echo "- \`ghcr.io/sap/sapmachine:${SM_VERSION}-${flvr}-gl\`" >> $GITHUB_STEP_SUMMARY echo "- \`ghcr.io/sap/sapmachine:${SM_MAJOR}-${flvr}-gl-${GL_MAJOR}\`" >> $GITHUB_STEP_SUMMARY + echo "- \`ghcr.io/sap/sapmachine:${SM_MAJOR}-${flvr}-gl-${GL_VERSION}\`" >> $GITHUB_STEP_SUMMARY + echo "- \`ghcr.io/sap/sapmachine:${SM_VERSION}-${flvr}-gl-${GL_MAJOR}\`" >> $GITHUB_STEP_SUMMARY + echo "- \`ghcr.io/sap/sapmachine:${SM_VERSION}-${flvr}-gl-${GL_VERSION}\`" >> $GITHUB_STEP_SUMMARY done # ============================================================================ From 897fbca1e7b018e75bebdd35f668912191aa2292 Mon Sep 17 00:00:00 2001 From: SapMachine Github Actions Bot Date: Tue, 24 Mar 2026 13:49:35 +0000 Subject: [PATCH 47/49] Update known SapMachine/GardenLinux versions --- .github/known-versions/versions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/known-versions/versions.json b/.github/known-versions/versions.json index e7a9b83e8ec..52089b4e3d8 100644 --- a/.github/known-versions/versions.json +++ b/.github/known-versions/versions.json @@ -6,7 +6,7 @@ "17": "17.0.18" }, "gardenlinux": { - "2150": "2150.0.", + "2150": "2150.0.0", "1877": "1877.14" } } From cf81668e2554e5b53b11069cb7a9c7f7a0f1a19d Mon Sep 17 00:00:00 2001 From: Raees Khan Date: Tue, 24 Mar 2026 14:52:16 +0100 Subject: [PATCH 48/49] Real test of 2150 with several tags --- .github/known-versions/versions.json | 2 +- .github/workflows/auto-detect-and-publish-gardenlinux.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/known-versions/versions.json b/.github/known-versions/versions.json index 52089b4e3d8..e7a9b83e8ec 100644 --- a/.github/known-versions/versions.json +++ b/.github/known-versions/versions.json @@ -6,7 +6,7 @@ "17": "17.0.18" }, "gardenlinux": { - "2150": "2150.0.0", + "2150": "2150.0.", "1877": "1877.14" } } diff --git a/.github/workflows/auto-detect-and-publish-gardenlinux.yml b/.github/workflows/auto-detect-and-publish-gardenlinux.yml index cc985018234..0a861dc1699 100644 --- a/.github/workflows/auto-detect-and-publish-gardenlinux.yml +++ b/.github/workflows/auto-detect-and-publish-gardenlinux.yml @@ -135,10 +135,10 @@ jobs: cd "${build_dir}" podman manifest create "${local_manifest}" - # podman build --platform linux/amd64,linux/arm64 --manifest "${local_manifest}" . + podman build --platform linux/amd64,linux/arm64 --manifest "${local_manifest}" . for tag in "${TAGS[@]}"; do - # podman manifest push "${local_manifest}" "${SM_REGISTRY}:${tag}" + podman manifest push "${local_manifest}" "${SM_REGISTRY}:${tag}" echo "✅ Pushed ${SM_REGISTRY}:${tag}" done From 2676c38d47581b072da6f9b2d7fdd33ee1c8f941 Mon Sep 17 00:00:00 2001 From: SapMachine Github Actions Bot Date: Tue, 24 Mar 2026 14:02:40 +0000 Subject: [PATCH 49/49] Update known SapMachine/GardenLinux versions --- .github/known-versions/versions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/known-versions/versions.json b/.github/known-versions/versions.json index e7a9b83e8ec..52089b4e3d8 100644 --- a/.github/known-versions/versions.json +++ b/.github/known-versions/versions.json @@ -6,7 +6,7 @@ "17": "17.0.18" }, "gardenlinux": { - "2150": "2150.0.", + "2150": "2150.0.0", "1877": "1877.14" } }