diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 2f4532be..98bb49c0 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -215,10 +215,20 @@ jobs: # The recipes (RFC-0047 ยง10) on the same image: deploy/swarm/stack.yml on this runner's engine # in swarm mode, and deploy/helm/cloudhal on a kind cluster (kind, helm and kubectl come with # the runner image). + # A pushed build is a multi-platform index (amd64, arm64, attestations); pulled, only the + # runner's platform has content, and `kind load docker-image` (`ctr import --all-platforms`) + # fails on the missing blobs (#311). So the recipes get a single-platform linux/amd64 image, + # loaded the way a pull request's build is: `FROM` the pushed digest and nothing else (the same + # layers and config), with no attestations. - name: Local copy of the image for the recipes run: | - if [ "$PUSH" = "true" ]; then docker pull "$SMOKE_IMAGE"; fi - docker tag "$SMOKE_IMAGE" cloudhal:ci + if [ "$PUSH" = "true" ]; then + printf 'FROM %s\n' "$SMOKE_IMAGE" | docker buildx build --platform linux/amd64 \ + --provenance=false --sbom=false --load -t cloudhal:ci - + else + docker tag "$SMOKE_IMAGE" cloudhal:ci + fi + docker image inspect cloudhal:ci --format '{{.Os}}/{{.Architecture}} {{.Id}}' env: SMOKE_IMAGE: ${{ steps.ref.outputs.image }} # Every step after the build is bounded (#306): a hang fails with the script's diagnostics