hello world render app
0
fork

Configure Feed

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

iterate on docker automation

Signed-off-by: softprops <d.tangren@gmail.com>

softprops 602c5821 8c031b3d

+25 -38
+25 -38
.tangled/workflows/deploy.yml
··· 1 - # inspired by https://tangled.org/evan.jarrett.net/at-container-registry/blob/main/.tangled/workflows/release-appview.yml 2 - # Builds multi-arch (amd64 + arm64) container image and publishes a manifest list. 1 + # Builds and pushes a container image to atcr.io 3 2 # 3 + # Note: multi-arch builds are not supported on Tangled's managed spindle. 4 + # This builds a single-arch image for the spindle's native architecture. 5 + # 6 + # Requires the DOCKER_APP_PASSWORD secret to be configured in the 7 + # repository settings on tangled.org. 4 8 when: 5 9 - event: ["push", "manual"] 6 10 branch: ["main"] 7 11 8 - engine: kubernetes 9 - image: quay.io/buildah/stable:latest 10 - architecture: [amd64, arm64] 12 + engine: nixery 13 + 14 + dependencies: 15 + nixpkgs: 16 + - buildah 11 17 12 18 environment: 13 19 IMAGE_REGISTRY: atcr.io ··· 16 22 DOCKERFILE: ./Dockerfile 17 23 18 24 steps: 19 - - name: Build image archive 25 + - name: Build image 20 26 command: | 21 27 set -e 22 - mkdir -p /artifacts 23 28 buildah bud \ 24 - --tag "${IMAGE_NAME}:${TANGLED_ARCHITECTURE}" \ 29 + --tag "${IMAGE_NAME}:latest" \ 25 30 --file "${DOCKERFILE}" \ 26 31 . 27 - buildah push \ 28 - "${IMAGE_NAME}:${TANGLED_ARCHITECTURE}" \ 29 - "oci-archive:/artifacts/${IMAGE_NAME}.tar" 30 32 31 - final: 32 - architecture: amd64 33 - image: quay.io/buildah/stable:latest 34 - steps: 35 - - name: Login to registry 36 - command: | 37 - echo "${DOCKER_APP_PASSWORD}" | buildah login \ 38 - -u "${IMAGE_USER}" \ 39 - --password-stdin \ 40 - "${IMAGE_REGISTRY}" 33 + - name: Push image 34 + command: | 35 + set -e 36 + FULL="${IMAGE_REGISTRY}/${IMAGE_USER}/${IMAGE_NAME}" 41 37 42 - - name: Create and push multi-arch manifest 43 - command: | 44 - set -e 45 - FULL="${IMAGE_REGISTRY}/${IMAGE_USER}/${IMAGE_NAME}" 38 + echo "${DOCKER_APP_PASSWORD}" | buildah login \ 39 + -u "${IMAGE_USER}" \ 40 + --password-stdin \ 41 + "${IMAGE_REGISTRY}" 46 42 47 - buildah pull "oci-archive:/artifacts/amd64/${IMAGE_NAME}.tar" 48 - buildah pull "oci-archive:/artifacts/arm64/${IMAGE_NAME}.tar" 43 + buildah tag "${IMAGE_NAME}:latest" "${FULL}:${TANGLED_REF_NAME}" 44 + buildah tag "${IMAGE_NAME}:latest" "${FULL}:latest" 49 45 50 - buildah manifest create "${FULL}:${TANGLED_REF_NAME}" 51 - buildah manifest add "${FULL}:${TANGLED_REF_NAME}" "${IMAGE_NAME}:amd64" 52 - buildah manifest add "${FULL}:${TANGLED_REF_NAME}" "${IMAGE_NAME}:arm64" 53 - 54 - buildah manifest push --all \ 55 - "${FULL}:${TANGLED_REF_NAME}" \ 56 - "docker://${FULL}:${TANGLED_REF_NAME}" 57 - 58 - buildah manifest push --all \ 59 - "${FULL}:${TANGLED_REF_NAME}" \ 60 - "docker://${FULL}:latest" 46 + buildah push "${FULL}:${TANGLED_REF_NAME}" 47 + buildah push "${FULL}:latest"