Drone MultiArchPush

This commit is contained in:
mr
2026-02-06 09:05:09 +01:00
parent a8eb3cd6f5
commit a5b8822c5b
2 changed files with 38 additions and 1 deletions

30
.drone.yml Normal file
View File

@@ -0,0 +1,30 @@
kind: pipeline
type: docker
name: build-and-push
trigger:
branch:
- main
steps:
- name: docker-login-build-push
image: docker:26
volumes:
- name: docker_sock
path: /var/run/docker.sock
environment:
DOCKER_USERNAME:
from_secret: docker-user
DOCKER_PASSWORD:
from_secret: docker_password
DOCKER_REGISTRY:
from_secret: docker-pw
IMAGE_NAME: ghcr.io/mon-org/mon-app
commands:
- echo "$DOCKER_PASSWORD" | docker login opencloudregistry -u "$DOCKER_USERNAME" --password-stdin
- make ci
volumes:
- name: docker_sock
host:
path: /var/run/docker.sock

View File

@@ -37,6 +37,13 @@ run-docker: docker publish-kind publish-registry docker-deploy
all: docker publish-kind
ci: docker publish-registry
prepare-multiarch:
docker buildx create --name multiarch --driver docker-container --use
docker run --privileged --rm tonistiigi/binfmt --install all | true
docker-multiarch:
DOCKER_BUILDKIT=1 docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t opencloudregistry/oc-workspace:latest --push .
ci: prepare-multiarch docker-multiarch
.PHONY: build run clean docker publish-kind publish-registry