From 46fee30537fa7aff3241431d28decfe9c0def7b4 Mon Sep 17 00:00:00 2001 From: Chai Bot Date: Wed, 19 Aug 2026 17:58:59 +0000 Subject: [PATCH] bootc-ubuntu-setup: Add support for ubuntu-26.04 runners Ubuntu 26.04 ships a sufficiently modern podman (with heredoc support and no manifest handling bugs), so unlike 24.04 we can skip the plucky PPA and package upgrade path entirely. This simplifies the setup on 26.04 to just installing `just`. The version gate is refactored from a hard `test` assertion into a `case` statement that dispatches per-version setup logic and rejects unsupported runners with a clear error. CI test jobs are added for ubuntu-26.04 in both PR and published-action workflows. The PR test includes a heredoc Containerfile build to verify the native podman meets the minimum capability bar per the acceptance criteria. Closes: https://github.com/bootc-dev/actions/issues/49 Assisted-by: Claude Code (Claude Opus 4) Signed-off-by: Chai Bot --- .github/workflows/test-actions-pr.yml | 31 +++++++++++++ .github/workflows/test-actions-published.yml | 13 ++++++ bootc-ubuntu-setup/action.yml | 48 +++++++++++++------- 3 files changed, 75 insertions(+), 17 deletions(-) diff --git a/.github/workflows/test-actions-pr.yml b/.github/workflows/test-actions-pr.yml index e05ce2d..a3f7188 100644 --- a/.github/workflows/test-actions-pr.yml +++ b/.github/workflows/test-actions-pr.yml @@ -24,6 +24,37 @@ jobs: just --version test -n "$ARCH" + test-bootc-ubuntu-setup-2604: + name: Test bootc-ubuntu-setup (26.04) + runs-on: ubuntu-26.04 + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Run bootc-ubuntu-setup + uses: ./bootc-ubuntu-setup + + - name: Verify setup + run: | + podman --version + just --version + test -n "$ARCH" + + - name: Verify podman heredoc support + shell: bash + run: | + set -euo pipefail + dir=$(mktemp -d) + cat > "${dir}/Containerfile" <<'CEOF' + FROM docker.io/library/alpine:latest + RUN < /heredoc-test.txt + EOF + CEOF + podman build -t localhost/heredoc-test:latest -f "${dir}/Containerfile" "${dir}" + result="$(podman run --rm localhost/heredoc-test:latest cat /heredoc-test.txt)" + test "${result}" = "heredoc works" + test-setup-rust: name: Test setup-rust runs-on: ubuntu-latest diff --git a/.github/workflows/test-actions-published.yml b/.github/workflows/test-actions-published.yml index a5e5705..a83569e 100644 --- a/.github/workflows/test-actions-published.yml +++ b/.github/workflows/test-actions-published.yml @@ -21,6 +21,19 @@ jobs: just --version test -n "$ARCH" + test-bootc-ubuntu-setup-2604: + name: Test bootc-ubuntu-setup@main (26.04) + runs-on: ubuntu-26.04 + steps: + - name: Run bootc-ubuntu-setup + uses: bootc-dev/actions/bootc-ubuntu-setup@main + + - name: Verify setup + run: | + podman --version + just --version + test -n "$ARCH" + test-setup-rust: name: Test setup-rust@main runs-on: ubuntu-latest diff --git a/bootc-ubuntu-setup/action.yml b/bootc-ubuntu-setup/action.yml index c3e9a7b..5c39a88 100644 --- a/bootc-ubuntu-setup/action.yml +++ b/bootc-ubuntu-setup/action.yml @@ -39,27 +39,41 @@ runs: fi done # We really want support for heredocs - - name: Update podman and install just + - name: Install required packages shell: bash run: | set -eux - # Require the runner is ubuntu-24.04 IDV=$(. /usr/lib/os-release && echo ${ID}-${VERSION_ID}) - test "${IDV}" = "ubuntu-24.04" - # plucky is the next release. The azure.archive.ubuntu.com mirror only carries amd64. - # Other architectures like arm64 use ports.ubuntu.com/ubuntu-ports. - if [ "$(dpkg --print-architecture)" = "amd64" ]; then - mirror="http://azure.archive.ubuntu.com/ubuntu" - else - mirror="http://ports.ubuntu.com/ubuntu-ports" - fi - echo "deb ${mirror} plucky universe main" | sudo tee /etc/apt/sources.list.d/plucky.list - # apt has a compiled-in default of 3 retries with exponential backoff (1s, 2s, 4s), - # capped at 30s per attempt. 34 retries covers ~15 min of cumulative delay; use 35. - echo 'Acquire::Retries "35";' | sudo tee /etc/apt/apt.conf.d/80-retries - /bin/time -f '%E %C' sudo apt update - # skopeo is currently older in plucky for some reason hence --allow-downgrades - /bin/time -f '%E %C' sudo apt install -y --allow-downgrades crun/plucky buildah/plucky podman/plucky skopeo/plucky just + case "${IDV}" in + ubuntu-24.04) + # 24.04's podman is too old (no heredoc support, manifest bugs); + # pull newer packages from plucky (25.04). + # The azure.archive.ubuntu.com mirror only carries amd64. + # Other architectures like arm64 use ports.ubuntu.com/ubuntu-ports. + if [ "$(dpkg --print-architecture)" = "amd64" ]; then + mirror="http://azure.archive.ubuntu.com/ubuntu" + else + mirror="http://ports.ubuntu.com/ubuntu-ports" + fi + echo "deb ${mirror} plucky universe main" | sudo tee /etc/apt/sources.list.d/plucky.list + # apt has a compiled-in default of 3 retries with exponential backoff (1s, 2s, 4s), + # capped at 30s per attempt. 34 retries covers ~15 min of cumulative delay; use 35. + echo 'Acquire::Retries "35";' | sudo tee /etc/apt/apt.conf.d/80-retries + /bin/time -f '%E %C' sudo apt update + # skopeo is currently older in plucky for some reason hence --allow-downgrades + /bin/time -f '%E %C' sudo apt install -y --allow-downgrades crun/plucky buildah/plucky podman/plucky skopeo/plucky just + ;; + ubuntu-26.04) + # 26.04 ships a sufficiently modern podman with heredoc support; + # no PPA or package upgrades needed — just install extras. + /bin/time -f '%E %C' sudo apt update + /bin/time -f '%E %C' sudo apt install -y just + ;; + *) + echo "Unsupported runner: ${IDV}" >&2 + exit 1 + ;; + esac # This is the default on e.g. Fedora derivatives, but not Debian. # Only needed when libvirt/virtualization is requested. - name: Enable unprivileged /dev/kvm access