36 lines
1.1 KiB
YAML
36 lines
1.1 KiB
YAML
when:
|
|
event: [tag]
|
|
|
|
steps:
|
|
build-homekit-arm64:
|
|
image: docker:27.2.0-dind
|
|
privileged: true
|
|
environment:
|
|
REGISTRY:
|
|
from_secret: local_registry
|
|
USERNAME:
|
|
from_secret: local_username
|
|
PASSWORD:
|
|
from_secret: local_password
|
|
commands:
|
|
- echo "Logging in to registry $REGISTRY as $USERNAME"
|
|
- echo "$PASSWORD" | docker login "$REGISTRY" -u "$USERNAME" --password-stdin
|
|
- docker version
|
|
- echo "Enabling binfmt for multi-arch builds"
|
|
- docker run --privileged --rm tonistiigi/binfmt --install all
|
|
- echo "Creating and bootstrapping buildx builder"
|
|
- docker buildx create --use --name multiarch-builder || docker buildx use multiarch-builder
|
|
- docker buildx inspect --bootstrap
|
|
- export IMAGE_TAG="${FORGE_NAME}/${CI_REPO}/homekit:${CI_COMMIT_TAG}"
|
|
- echo "Building ARM64 image: $IMAGE_TAG"
|
|
- docker buildx build \
|
|
--platform linux/arm64 \
|
|
-f apps/homekit/Dockerfile \
|
|
-t "$IMAGE_TAG" \
|
|
--push .
|
|
when:
|
|
event: [tag]
|
|
ref:
|
|
exclude:
|
|
- refs/tags/*-configchange
|