A container registry that uses the AT Protocol for manifest storage and S3 for blob storage.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

try matrix builds

+47 -11
+47 -11
.tangled/workflows/release.yml
··· 1 1 # ATCR Release Pipeline for Tangled.org 2 - # Triggers on version tags and builds cross-platform binaries using buildah 2 + # Builds multi-arch container images (amd64 + arm64) and creates manifest lists 3 3 4 4 when: 5 5 - event: ["push"] ··· 7 7 8 8 engine: kubernetes 9 9 image: quay.io/buildah/stable:latest 10 - architecture: amd64 10 + architecture: [amd64, arm64] 11 11 12 12 environment: 13 13 IMAGE_REGISTRY: atcr.io ··· 23 23 24 24 - name: Build and push AppView image 25 25 command: | 26 + TAG="${IMAGE_REGISTRY}/${IMAGE_USER}/appview:${TANGLED_REF_NAME}-${TANGLED_ARCHITECTURE}" 26 27 buildah bud \ 27 - --tag ${IMAGE_REGISTRY}/${IMAGE_USER}/appview:${TANGLED_REF_NAME} \ 28 - --tag ${IMAGE_REGISTRY}/${IMAGE_USER}/appview:latest \ 28 + --tag "${TAG}" \ 29 29 --file ./Dockerfile.appview \ 30 30 . 31 - 32 - buildah push \ 33 - ${IMAGE_REGISTRY}/${IMAGE_USER}/appview:latest 31 + buildah push "${TAG}" 32 + mkdir -p /artifacts 33 + echo "${TAG}" > /artifacts/appview.txt 34 34 35 35 - name: Build and push Hold image 36 36 command: | 37 + TAG="${IMAGE_REGISTRY}/${IMAGE_USER}/hold:${TANGLED_REF_NAME}-${TANGLED_ARCHITECTURE}" 37 38 buildah bud \ 38 - --tag ${IMAGE_REGISTRY}/${IMAGE_USER}/hold:${TANGLED_REF_NAME} \ 39 - --tag ${IMAGE_REGISTRY}/${IMAGE_USER}/hold:latest \ 39 + --tag "${TAG}" \ 40 40 --file ./Dockerfile.hold \ 41 41 . 42 + buildah push "${TAG}" 43 + echo "${TAG}" > /artifacts/hold.txt 42 44 43 - buildah push \ 44 - ${IMAGE_REGISTRY}/${IMAGE_USER}/hold:latest 45 + - name: Build and push Scanner image 46 + command: | 47 + TAG="${IMAGE_REGISTRY}/${IMAGE_USER}/scanner:${TANGLED_REF_NAME}-${TANGLED_ARCHITECTURE}" 48 + buildah bud \ 49 + --tag "${TAG}" \ 50 + --file ./Dockerfile.scanner \ 51 + . 52 + buildah push "${TAG}" 53 + echo "${TAG}" > /artifacts/scanner.txt 54 + 55 + final: 56 + architecture: amd64 57 + image: quay.io/buildah/stable:latest 58 + steps: 59 + - name: Login to registry 60 + command: | 61 + echo "${APP_PASSWORD}" | buildah login \ 62 + -u "${IMAGE_USER}" \ 63 + --password-stdin \ 64 + ${IMAGE_REGISTRY} 65 + 66 + - name: Create and push multi-arch manifests 67 + command: | 68 + for IMAGE in appview hold scanner; do 69 + FULL="${IMAGE_REGISTRY}/${IMAGE_USER}/${IMAGE}" 70 + 71 + AMD64_TAG=$(cat /artifacts/amd64/${IMAGE}.txt) 72 + ARM64_TAG=$(cat /artifacts/arm64/${IMAGE}.txt) 73 + 74 + buildah manifest create "${FULL}:${TANGLED_REF_NAME}" 75 + buildah manifest add "${FULL}:${TANGLED_REF_NAME}" "docker://${AMD64_TAG}" 76 + buildah manifest add "${FULL}:${TANGLED_REF_NAME}" "docker://${ARM64_TAG}" 77 + buildah manifest push --all "${FULL}:${TANGLED_REF_NAME}" "docker://${FULL}:${TANGLED_REF_NAME}" 78 + 79 + buildah manifest push --all "${FULL}:${TANGLED_REF_NAME}" "docker://${FULL}:latest" 80 + done