Use skopeo for registry push (Docker 27 manifest compat)
All checks were successful
Build Container / build (push) Successful in 12s

Docker 27's manifest format has compatibility issues with zot registry.
Skopeo handles manifest conversion correctly.

Still simpler than the old Tailscale sidecar approach - just save to
tarball and use skopeo copy.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Erich Blume 2026-01-30 10:13:30 -08:00
commit 7aada180de

View file

@ -1,5 +1,8 @@
name: 'Build and Push Image' name: 'Build and Push Image'
description: 'Build a container image with Docker and push to registry.ops.eblu.me' description: 'Build a container image with Docker and push to registry.ops.eblu.me using skopeo'
# Note: Uses skopeo for push because Docker 27's manifest format has compatibility
# issues with zot registry. Skopeo handles manifest conversion correctly.
inputs: inputs:
context: context:
@ -26,19 +29,32 @@ runs:
- name: Build image - name: Build image
shell: bash shell: bash
run: | run: |
echo "Building ${{ inputs.registry }}/${{ inputs.image_name }}:${{ inputs.version }}" echo "Building ${{ inputs.image_name }}:${{ inputs.version }}"
docker build \ docker build \
--tag ${{ inputs.registry }}/${{ inputs.image_name }}:${{ inputs.version }} \ --tag ${{ inputs.image_name }}:${{ inputs.version }} \
--tag ${{ inputs.registry }}/${{ inputs.image_name }}:${{ github.sha }} \
--file ${{ inputs.context }}/${{ inputs.dockerfile }} \ --file ${{ inputs.context }}/${{ inputs.dockerfile }} \
${{ inputs.context }} ${{ inputs.context }}
- name: Push to registry - name: Push to registry
shell: bash shell: bash
run: | run: |
echo "Saving image to tarball..."
docker save ${{ inputs.image_name }}:${{ inputs.version }} -o /tmp/image.tar
echo "Installing skopeo..."
apk add --no-cache skopeo >/dev/null 2>&1 || apt-get update && apt-get install -y skopeo >/dev/null 2>&1 || true
echo "Pushing ${{ inputs.registry }}/${{ inputs.image_name }}:${{ inputs.version }}" echo "Pushing ${{ inputs.registry }}/${{ inputs.image_name }}:${{ inputs.version }}"
docker push ${{ inputs.registry }}/${{ inputs.image_name }}:${{ inputs.version }} skopeo copy \
docker push ${{ inputs.registry }}/${{ inputs.image_name }}:${{ github.sha }} docker-archive:/tmp/image.tar \
docker://${{ inputs.registry }}/${{ inputs.image_name }}:${{ inputs.version }}
echo "Pushing ${{ inputs.registry }}/${{ inputs.image_name }}:${{ github.sha }}"
skopeo copy \
docker-archive:/tmp/image.tar \
docker://${{ inputs.registry }}/${{ inputs.image_name }}:${{ github.sha }}
rm -f /tmp/image.tar
- name: Summary - name: Summary
shell: bash shell: bash