From d8f069272d6d90c181ed098a7a1405f0ff186194 Mon Sep 17 00:00:00 2001 From: ale Date: Tue, 8 Oct 2024 12:03:24 +0200 Subject: [PATCH] build-arm64 --- .drone.yml | 32 +++++++++++++++++++++++++------- LibreTranslate | 2 +- 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/.drone.yml b/.drone.yml index 1ff924e..ecb6e21 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,5 +1,5 @@ kind: pipeline -name: build-linux-amd64 +name: build-linux-arm64-amd64 type: docker platform: @@ -10,7 +10,30 @@ clone: disable: true steps: -- name: build +- name: build-arm64 + image: docker:dind + privileged: true + environment: + USER: + from_secret: user + PASS: + from_secret: pass + REGISTRY: + from_secret: registry + volumes: + - name: etcdocker + path: /etc/docker + commands: + - docker login -u $USER -p $PASS $REGISTRY + - git clone --recursive https://git.manalejandro.com/ale/libretranslate-api . + - cd LibreTranslate && docker buildx build --build-arg with_models=true --platform arm64 -t $REGISTRY/libretranslate-api:arm64 -f ./docker/Dockerfile . + - docker push $REGISTRY/libretranslate-api:arm64 + when: + event: + - push + - tag + +- name: build-amd64 image: docker:dind privileged: true environment: @@ -21,8 +44,6 @@ steps: REGISTRY: from_secret: registry volumes: - - name: dockersock - path: /var/run/docker.sock - name: etcdocker path: /etc/docker commands: @@ -37,9 +58,6 @@ steps: - tag volumes: -- name: dockersock - host: - path: /var/run/docker.sock - name: etcdocker host: path: /etc/docker diff --git a/LibreTranslate b/LibreTranslate index 6b4044a..e112461 160000 --- a/LibreTranslate +++ b/LibreTranslate @@ -1 +1 @@ -Subproject commit 6b4044aee32e209e1580d3e2d14da2c8488b02f4 +Subproject commit e112461632c6014b7bf7f8e3809116e352021be4