ale
701154aef6
Some checks reported errors
continuous-integration/drone/push Build encountered an error
86 lines
1.9 KiB
YAML
86 lines
1.9 KiB
YAML
---
|
|
kind: pipeline
|
|
name: build-linux-arm64
|
|
type: docker
|
|
|
|
clone:
|
|
disable: true
|
|
|
|
steps:
|
|
- 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
|
|
- name: dockersock
|
|
path: /var/run/docker.sock
|
|
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
|
|
|
|
volumes:
|
|
- name: dockersock
|
|
host:
|
|
path: /var/run/docker.sock
|
|
- name: etcdocker
|
|
host:
|
|
path: /etc/docker
|
|
|
|
---
|
|
kind: pipeline
|
|
name: build-linux-amd64
|
|
type: docker
|
|
|
|
clone:
|
|
disable: true
|
|
|
|
- name: build-amd64
|
|
image: docker:dind
|
|
privileged: true
|
|
environment:
|
|
USER:
|
|
from_secret: user
|
|
PASS:
|
|
from_secret: pass
|
|
REGISTRY:
|
|
from_secret: registry
|
|
volumes:
|
|
- name: etcdocker
|
|
path: /etc/docker
|
|
- name: dockersock
|
|
path: /var/run/docker.sock
|
|
commands:
|
|
- docker login -u $USER -p $PASS $REGISTRY
|
|
- docker run --rm --privileged $REGISTRY/qemu-user-static --reset -p yes
|
|
- git clone --recursive https://git.manalejandro.com/ale/libretranslate-api .
|
|
- cd LibreTranslate && docker buildx build --build-arg with_models=true --platform amd64 -t $REGISTRY/libretranslate-api -f ./docker/Dockerfile .
|
|
- docker push $REGISTRY/libretranslate-api
|
|
- docker tag $REGISTRY/libretranslate-api $REGISTRY/libretranslate-api:amd64
|
|
- docker push $REGISTRY/libretranslate-api:amd64
|
|
when:
|
|
event:
|
|
- push
|
|
- tag
|
|
|
|
volumes:
|
|
- name: dockersock
|
|
host:
|
|
path: /var/run/docker.sock
|
|
- name: etcdocker
|
|
host:
|
|
path: /etc/docker
|