Skip to content

Commit 108048c

Browse files
committed
feat: add GitHub Actions CI workflow for podman-based OCI image builds and registry pushes
1 parent 559aa72 commit 108048c

2 files changed

Lines changed: 17 additions & 2 deletions

File tree

.github/workflows/mios-ci.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,12 @@ jobs:
103103
sudo apt-get update -qq
104104
sudo apt-get install -y podman skopeo
105105
106+
- name: Configure host podman storage (disable metacopy)
107+
run: |
108+
sudo mkdir -p /etc/containers
109+
echo -e '[storage]\ndriver = "overlay"\n[storage.options.overlay]\nmountopt = "nodev"' | sudo tee /etc/containers/storage.conf
110+
sudo podman system reset -f
111+
106112
- name: Free disk space on the GHA runner
107113
# GitHub-hosted ubuntu-24.04 runners ship with ~14 GB free on
108114
# /. The MiOS Containerfile bakes 16+ container images into
@@ -294,6 +300,12 @@ jobs:
294300
sudo apt-get update -qq
295301
sudo apt-get install -y podman
296302
303+
- name: Configure host podman storage (disable metacopy)
304+
run: |
305+
sudo mkdir -p /etc/containers
306+
echo -e '[storage]\ndriver = "overlay"\n[storage.options.overlay]\nmountopt = "nodev"' | sudo tee /etc/containers/storage.conf
307+
sudo podman system reset -f
308+
297309
- name: Free disk space on the GHA runner (smoke job)
298310
# Same rationale as the main build job -- runner needs ~30 GB
299311
# extra room for the 16+ bound-image bakes during smoke build.

Containerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ RUN bootc completion bash > /etc/bash_completion.d/bootc
149149
# defensively. Any bound image that fails to bake fails the build LOUD --
150150
# better than shipping an image whose every deployment artifact 404s.
151151
RUN --network=host set -eux; \
152+
mkdir -p /tmp/inner-podman; \
153+
echo -e '[storage]\ndriver = "overlay"\n[storage.options.overlay]\nmountopt = "nodev"' > /tmp/inner-podman/storage.conf; \
152154
install -d -m 0755 /usr/lib/containers/storage; \
153155
baked=0; failed=0; \
154156
for q in /usr/lib/bootc/bound-images.d/*.container; do \
@@ -181,7 +183,7 @@ RUN --network=host set -eux; \
181183
echo "bound-image: baking $img"; \
182184
_pulled=0; \
183185
for _try in 1 2 3; do \
184-
if podman --root /usr/lib/containers/storage pull "$img"; then _pulled=1; break; fi; \
186+
if CONTAINERS_STORAGE_CONF=/tmp/inner-podman/storage.conf podman --root /usr/lib/containers/storage pull "$img"; then _pulled=1; break; fi; \
185187
echo " bound-image pull attempt $_try/3 failed for $img -- retrying in 3s"; sleep 3; \
186188
done; \
187189
if [ "$_pulled" = 1 ]; then \
@@ -210,7 +212,8 @@ RUN --network=host set -eux; \
210212
# (preset-enabled, commit f5a1ac9) which runs chmod -R go+rX on the running \
211213
# host where layer sizes and build-time commit limits do not matter. \
212214
echo "bound-images: chmod 0755 the main storage directory"; \
213-
chmod 0755 /usr/lib/containers/storage
215+
chmod 0755 /usr/lib/containers/storage; \
216+
rm -rf /tmp/inner-podman
214217

215218
RUN ostree container commit
216219
# bootc container lint MUST be the final instruction (ARCHITECTURAL LAW 4).

0 commit comments

Comments
 (0)