libretranslate-api/.drone.yml

73 lines
1.7 KiB
YAML
Raw Normal View History

2024-10-04 09:56:56 +00:00
kind: pipeline
2024-10-08 10:29:38 +00:00
name: build-linux-arm64-amd64
2024-10-04 09:56:56 +00:00
type: docker
2024-10-08 11:19:03 +00:00
platform:
os: linux
arch: arm64
2024-10-04 10:18:07 +00:00
clone:
disable: true
2024-10-04 09:56:56 +00:00
steps:
2024-10-08 10:03:24 +00:00
- 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
2024-10-08 10:05:51 +00:00
- name: dockersock
path: /var/run/docker.sock
2024-10-08 10:03:24 +00:00
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
2024-10-04 09:56:56 +00:00
image: docker:dind
privileged: true
environment:
USER:
from_secret: user
PASS:
from_secret: pass
REGISTRY:
from_secret: registry
2024-10-06 15:23:02 +00:00
volumes:
- name: etcdocker
path: /etc/docker
2024-10-08 10:05:51 +00:00
- name: dockersock
path: /var/run/docker.sock
2024-10-04 09:56:56 +00:00
commands:
2024-10-06 15:29:56 +00:00
- docker login -u $USER -p $PASS $REGISTRY
2024-10-06 15:29:16 +00:00
- docker run --rm --privileged $REGISTRY/qemu-user-static --reset -p yes
2024-10-06 15:23:02 +00:00
- git clone --recursive https://git.manalejandro.com/ale/libretranslate-api .
2024-10-07 11:19:53 +00:00
- cd LibreTranslate && docker buildx build --build-arg with_models=true --platform amd64 -t $REGISTRY/libretranslate-api -f ./docker/Dockerfile .
2024-10-04 09:56:56 +00:00
- docker push $REGISTRY/libretranslate-api
2024-10-08 10:13:48 +00:00
- docker tag $REGISTRY/libretranslate-api $REGISTRY/libretranslate-api:amd64
- docker push $REGISTRY/libretranslate-api:amd64
2024-10-04 09:56:56 +00:00
when:
event:
- push
- tag
2024-10-06 00:30:21 +00:00
2024-10-06 15:23:02 +00:00
volumes:
2024-10-08 10:05:51 +00:00
- name: dockersock
host:
path: /var/run/docker.sock
2024-10-06 15:23:02 +00:00
- name: etcdocker
host:
path: /etc/docker