Skip to content

Commit 6a93645

Browse files
Fix release workflow: manifest list conflict on major-version arch tags (#63)
* Fix release workflow: avoid pushing major-version tags to arch-specific repos GHCR will not overwrite a manifest-list tag with a single-arch image push, causing docker manifest create to fail with "is a manifest list". Fix by only pushing the exact version tag to -amd64/-arm64 repos; both manifest lists (:VERSION and :MAJOR) now reference the exact-version arch images. Also fix deprecated LABEL syntax warnings in package/Dockerfile. * Fix manifest list error: disable BuildKit default attestations Newer Docker/BuildKit wraps single-platform builds in an OCI index when it attaches a provenance attestation manifest. This makes every pushed image a manifest list, causing docker manifest create to fail with "is a manifest list". Setting BUILDX_NO_DEFAULT_ATTESTATIONS=1 prevents the attestation wrapper so arch-specific images are pushed as plain single-platform manifests.
1 parent c3dcc7a commit 6a93645

3 files changed

Lines changed: 30 additions & 26 deletions

File tree

package/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
FROM scratch
2-
LABEL org.opencontainers.image.source "https://github.com/rails-lambda/crypteia"
3-
LABEL org.opencontainers.image.description "Rust Lambda Extension for any Runtime to preload SSM Parameters as Secure Environment Variables!"
2+
LABEL org.opencontainers.image.source="https://github.com/rails-lambda/crypteia"
3+
LABEL org.opencontainers.image.description="Rust Lambda Extension for any Runtime to preload SSM Parameters as Secure Environment Variables!"
44
COPY ./package/opt /opt

package/deploy-image-amzn

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,34 +10,36 @@ CRYPTEIA_VERSION_MAJOR=$(echo "${CRYPTEIA_VERSION}" | cut -d. -f1)
1010

1111
docker login ghcr.io -u "metaskills" -p $DOCKER_LOGIN_PAT
1212

13+
# Prevent BuildKit from wrapping single-platform builds in an OCI index
14+
# (attestation manifests), which breaks docker manifest create.
15+
export BUILDX_NO_DEFAULT_ATTESTATIONS=1
16+
1317
./amzn/setup
1418
BASE_NAME_AMD64="ghcr.io/rails-lambda/crypteia-extension-amzn-amd64"
1519
docker build \
1620
--platform linux/amd64 \
17-
--tag "${BASE_NAME_AMD64}:${CRYPTEIA_VERSION_MAJOR}" \
1821
--tag "${BASE_NAME_AMD64}:${CRYPTEIA_VERSION}" \
1922
--file package/Dockerfile .
20-
docker push "${BASE_NAME_AMD64}:${CRYPTEIA_VERSION_MAJOR}"
2123
docker push "${BASE_NAME_AMD64}:${CRYPTEIA_VERSION}"
2224

2325
./amzn/setup-arm64
2426
BASE_NAME_ARM64="ghcr.io/rails-lambda/crypteia-extension-amzn-arm64"
2527
docker build \
2628
--platform linux/arm64 \
27-
--tag "${BASE_NAME_ARM64}:${CRYPTEIA_VERSION_MAJOR}" \
2829
--tag "${BASE_NAME_ARM64}:${CRYPTEIA_VERSION}" \
2930
--file package/Dockerfile .
30-
docker push "${BASE_NAME_ARM64}:${CRYPTEIA_VERSION_MAJOR}"
3131
docker push "${BASE_NAME_ARM64}:${CRYPTEIA_VERSION}"
3232

33-
docker manifest create \
34-
"ghcr.io/rails-lambda/crypteia-extension-amzn:${CRYPTEIA_VERSION_MAJOR}" \
35-
--amend "${BASE_NAME_AMD64}:${CRYPTEIA_VERSION_MAJOR}" \
36-
--amend "${BASE_NAME_ARM64}:${CRYPTEIA_VERSION_MAJOR}"
37-
docker manifest push "ghcr.io/rails-lambda/crypteia-extension-amzn:${CRYPTEIA_VERSION_MAJOR}"
38-
33+
docker manifest rm "ghcr.io/rails-lambda/crypteia-extension-amzn:${CRYPTEIA_VERSION}" 2>/dev/null || true
3934
docker manifest create \
4035
"ghcr.io/rails-lambda/crypteia-extension-amzn:${CRYPTEIA_VERSION}" \
41-
--amend "${BASE_NAME_AMD64}:${CRYPTEIA_VERSION}" \
42-
--amend "${BASE_NAME_ARM64}:${CRYPTEIA_VERSION}"
36+
"${BASE_NAME_AMD64}:${CRYPTEIA_VERSION}" \
37+
"${BASE_NAME_ARM64}:${CRYPTEIA_VERSION}"
4338
docker manifest push "ghcr.io/rails-lambda/crypteia-extension-amzn:${CRYPTEIA_VERSION}"
39+
40+
docker manifest rm "ghcr.io/rails-lambda/crypteia-extension-amzn:${CRYPTEIA_VERSION_MAJOR}" 2>/dev/null || true
41+
docker manifest create \
42+
"ghcr.io/rails-lambda/crypteia-extension-amzn:${CRYPTEIA_VERSION_MAJOR}" \
43+
"${BASE_NAME_AMD64}:${CRYPTEIA_VERSION}" \
44+
"${BASE_NAME_ARM64}:${CRYPTEIA_VERSION}"
45+
docker manifest push "ghcr.io/rails-lambda/crypteia-extension-amzn:${CRYPTEIA_VERSION_MAJOR}"

package/deploy-image-debian

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,34 +10,36 @@ CRYPTEIA_VERSION_MAJOR=$(echo "${CRYPTEIA_VERSION}" | cut -d. -f1)
1010

1111
docker login ghcr.io -u "metaskills" -p $DOCKER_LOGIN_PAT
1212

13+
# Prevent BuildKit from wrapping single-platform builds in an OCI index
14+
# (attestation manifests), which breaks docker manifest create.
15+
export BUILDX_NO_DEFAULT_ATTESTATIONS=1
16+
1317
./bin/setup
1418
BASE_NAME_AMD64="ghcr.io/rails-lambda/crypteia-extension-debian-amd64"
1519
docker build \
1620
--platform linux/amd64 \
17-
--tag "${BASE_NAME_AMD64}:${CRYPTEIA_VERSION_MAJOR}" \
1821
--tag "${BASE_NAME_AMD64}:${CRYPTEIA_VERSION}" \
1922
--file package/Dockerfile .
20-
docker push "${BASE_NAME_AMD64}:${CRYPTEIA_VERSION_MAJOR}"
2123
docker push "${BASE_NAME_AMD64}:${CRYPTEIA_VERSION}"
2224

2325
./debian/setup-arm64
2426
BASE_NAME_ARM64="ghcr.io/rails-lambda/crypteia-extension-debian-arm64"
2527
docker build \
2628
--platform linux/arm64 \
27-
--tag "${BASE_NAME_ARM64}:${CRYPTEIA_VERSION_MAJOR}" \
2829
--tag "${BASE_NAME_ARM64}:${CRYPTEIA_VERSION}" \
2930
--file package/Dockerfile .
30-
docker push "${BASE_NAME_ARM64}:${CRYPTEIA_VERSION_MAJOR}"
3131
docker push "${BASE_NAME_ARM64}:${CRYPTEIA_VERSION}"
3232

33-
docker manifest create \
34-
"ghcr.io/rails-lambda/crypteia-extension-debian:${CRYPTEIA_VERSION_MAJOR}" \
35-
--amend "${BASE_NAME_AMD64}:${CRYPTEIA_VERSION_MAJOR}" \
36-
--amend "${BASE_NAME_ARM64}:${CRYPTEIA_VERSION_MAJOR}"
37-
docker manifest push "ghcr.io/rails-lambda/crypteia-extension-debian:${CRYPTEIA_VERSION_MAJOR}"
38-
33+
docker manifest rm "ghcr.io/rails-lambda/crypteia-extension-debian:${CRYPTEIA_VERSION}" 2>/dev/null || true
3934
docker manifest create \
4035
"ghcr.io/rails-lambda/crypteia-extension-debian:${CRYPTEIA_VERSION}" \
41-
--amend "${BASE_NAME_AMD64}:${CRYPTEIA_VERSION}" \
42-
--amend "${BASE_NAME_ARM64}:${CRYPTEIA_VERSION}"
36+
"${BASE_NAME_AMD64}:${CRYPTEIA_VERSION}" \
37+
"${BASE_NAME_ARM64}:${CRYPTEIA_VERSION}"
4338
docker manifest push "ghcr.io/rails-lambda/crypteia-extension-debian:${CRYPTEIA_VERSION}"
39+
40+
docker manifest rm "ghcr.io/rails-lambda/crypteia-extension-debian:${CRYPTEIA_VERSION_MAJOR}" 2>/dev/null || true
41+
docker manifest create \
42+
"ghcr.io/rails-lambda/crypteia-extension-debian:${CRYPTEIA_VERSION_MAJOR}" \
43+
"${BASE_NAME_AMD64}:${CRYPTEIA_VERSION}" \
44+
"${BASE_NAME_ARM64}:${CRYPTEIA_VERSION}"
45+
docker manifest push "ghcr.io/rails-lambda/crypteia-extension-debian:${CRYPTEIA_VERSION_MAJOR}"

0 commit comments

Comments
 (0)