From ded80c6e15c1d2d60f0218d1967695080ce3dee2 Mon Sep 17 00:00:00 2001 From: obsidian-ai Date: Wed, 6 May 2026 17:09:10 +0100 Subject: [PATCH] ci(bluebuild): pre-pull secureblue base + share podman storage GHCR rejected skopeo's anonymous manifest call from inside the bluebuild CLI container. Pre-pull the secureblue base on the host podman (which handles the anonymous token dance), then bind-mount /var/lib/containers/storage into the bluebuild container so its buildah sees the cached base layer. Drop deprecated --inspect-driver flag while we are touching the invocation. --- .github/workflows/build-bluebuild.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-bluebuild.yml b/.github/workflows/build-bluebuild.yml index 8308eb1..23af3af 100644 --- a/.github/workflows/build-bluebuild.yml +++ b/.github/workflows/build-bluebuild.yml @@ -95,6 +95,16 @@ jobs: chmod +x /usr/local/bin/cosign cosign version + - name: Pre-pull secureblue base image + run: | + set -euxo pipefail + # GHCR's manifest API rejects anonymous calls from skopeo + # ("Not authorized") for some public images — but `podman + # pull` handles the anonymous token dance correctly. Pre-pull + # the base into local podman storage so bluebuild's + # templating step finds it without a registry round-trip. + podman pull ghcr.io/secureblue/securecore-kinoite-hardened-userns:latest + - name: Build OCI image with BlueBuild CLI container id: bluebuild # blue-build/github-action requires docker buildx which podman @@ -106,16 +116,20 @@ jobs: # Pull cli image; pinned to v0.9.x at action time. podman pull ghcr.io/blue-build/cli:latest # Mount the repo + podman socket; build with buildah driver. + # Bind host /var/lib/containers/storage into the bluebuild + # CLI container so buildah inside it can see the pre-pulled + # secureblue base layer (avoids GHCR auth round-trip during + # templating). podman run --rm \ --privileged \ --entrypoint /usr/bin/bluebuild \ -v "$PWD:/work" \ + -v /var/lib/containers/storage:/var/lib/containers/storage \ -w /work \ -e BB_BUILD_DRIVER=buildah \ ghcr.io/blue-build/cli:latest \ build \ --build-driver buildah \ - --inspect-driver skopeo \ bluebuild/recipe.yml # bluebuild CLI tags as : in local podman # storage. List + verify, then re-tag for the registries.