From 7bf19b6a7be28314384314393006139048f2007e Mon Sep 17 00:00:00 2001 From: Mathias Bergqvist Date: Tue, 21 Apr 2026 07:05:44 +0200 Subject: [PATCH] fix: replace buildctl push with skopeo for simpler registry auth --- .gitea/workflows/cd.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/cd.yml b/.gitea/workflows/cd.yml index ebdab4c..3a55e41 100644 --- a/.gitea/workflows/cd.yml +++ b/.gitea/workflows/cd.yml @@ -20,14 +20,25 @@ jobs: - name: Build and push image run: | + set -e + trap 'rm -f /tmp/supervisor-image.tar' EXIT IMAGE_TAG="${{ github.sha }}" echo "Building ${IMAGE}:${IMAGE_TAG}" + + # Build to local OCI tar (no registry auth needed at build time) buildctl --addr "${BUILDKIT_HOST}" build \ --frontend dockerfile.v0 \ --local context=. \ --local dockerfile=. \ --opt build-arg:VERSION="${IMAGE_TAG}" \ - --output "type=image,name=${IMAGE}:${IMAGE_TAG},push=true" + --output type=oci,dest=/tmp/supervisor-image.tar + + # Push with skopeo using simple credential flag (avoids OAuth token flow) + skopeo copy \ + oci-archive:/tmp/supervisor-image.tar \ + docker://${IMAGE}:${IMAGE_TAG} \ + --dest-creds "${{ secrets.REGISTRY_CREDS }}" + echo "Built and pushed ${IMAGE}:${IMAGE_TAG}" - name: Update infra repo