fix: replace buildctl push with skopeo for simpler registry auth
This commit is contained in:
@@ -20,14 +20,25 @@ jobs:
|
|||||||
|
|
||||||
- name: Build and push image
|
- name: Build and push image
|
||||||
run: |
|
run: |
|
||||||
|
set -e
|
||||||
|
trap 'rm -f /tmp/supervisor-image.tar' EXIT
|
||||||
IMAGE_TAG="${{ github.sha }}"
|
IMAGE_TAG="${{ github.sha }}"
|
||||||
echo "Building ${IMAGE}:${IMAGE_TAG}"
|
echo "Building ${IMAGE}:${IMAGE_TAG}"
|
||||||
|
|
||||||
|
# Build to local OCI tar (no registry auth needed at build time)
|
||||||
buildctl --addr "${BUILDKIT_HOST}" build \
|
buildctl --addr "${BUILDKIT_HOST}" build \
|
||||||
--frontend dockerfile.v0 \
|
--frontend dockerfile.v0 \
|
||||||
--local context=. \
|
--local context=. \
|
||||||
--local dockerfile=. \
|
--local dockerfile=. \
|
||||||
--opt build-arg:VERSION="${IMAGE_TAG}" \
|
--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}"
|
echo "Built and pushed ${IMAGE}:${IMAGE_TAG}"
|
||||||
|
|
||||||
- name: Update infra repo
|
- name: Update infra repo
|
||||||
|
|||||||
Reference in New Issue
Block a user