Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/test-actions-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<EOF
echo "heredoc works" > /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
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/test-actions-published.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
48 changes: 31 additions & 17 deletions bootc-ubuntu-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down