mirror of
https://github.com/danog/MadelineProto.git
synced 2025-01-22 21:31:28 +01:00
Autodetection
This commit is contained in:
parent
8808fb5949
commit
9a7e536d65
@ -17,6 +17,8 @@ pipeline:
|
||||
variants:
|
||||
image: docker:cli
|
||||
secrets: [docker_username, docker_password]
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
commands:
|
||||
- tests/docker.sh
|
||||
when:
|
||||
|
@ -4,17 +4,28 @@ docker login --username "$DOCKER_USERNAME" --password "$DOCKER_PASSWORD"
|
||||
|
||||
docker buildx create --use --name wp --driver remote tcp://192.168.69.1:1234
|
||||
|
||||
has_riscv=0
|
||||
if ping -c 1 192.168.69.206; then
|
||||
docker buildx create --append --name wp --driver remote tcp://192.168.69.206:1234
|
||||
has_riscv=1
|
||||
fi
|
||||
|
||||
has_x86=0
|
||||
if ping -c 1 192.168.69.236; then
|
||||
docker buildx create --append --name wp --driver remote tcp://192.168.69.236:1234
|
||||
has_x86=1
|
||||
fi
|
||||
|
||||
arch="linux/arm64"
|
||||
if [ $has_x86 -eq 1 ]; then
|
||||
arch="$arch,linux/amd64"
|
||||
fi
|
||||
|
||||
for f in debian alpine; do
|
||||
docker buildx build -f tests/dockerfiles/Dockerfile.$f --platform linux/arm64,linux/amd64 . -t danog/madelineproto:next-$f --cache-from danog/madelineproto:next-$f --cache-to type=inline
|
||||
#IMG=danog/php:8.2-fpm-$f docker buildx build -f tests/dockerfiles/Dockerfile.$f --platform linux/riscv64 . -t danog/madelineproto:next-$f --cache-from danog/madelineproto:next-$f --cache-to type=inline
|
||||
docker buildx build -f tests/dockerfiles/Dockerfile.$f --platform $arch . -t danog/madelineproto:next-$f --cache-from danog/madelineproto:next-$f --cache-to type=inline
|
||||
if [ $has_riscv -eq 1 ]; then
|
||||
IMG=danog/php:8.2-fpm-$f docker buildx build -f tests/dockerfiles/Dockerfile.$f --platform linux/riscv64 . -t danog/madelineproto:next-$f --cache-from danog/madelineproto:next-$f --cache-to type=inline
|
||||
fi
|
||||
docker push danog/php:next-$f
|
||||
|
||||
docker tag danog/php:next-$f danog/php:next-$f-$CI_COMMIT_HASH
|
||||
|
Loading…
x
Reference in New Issue
Block a user