From 726811f91ff36b129f0205dfbf757e372f0d97da Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Sat, 16 May 2020 15:06:37 +0200 Subject: [PATCH] Separated docker builds in different platforms --- .travis.yml | 15 ++++++++++++++- docker/build | 4 ++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index f2acb9ca..b3e8df21 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,11 +8,24 @@ branches: jobs: include: - - name: "Docker publish" + - name: "Docker publish - linux/arm/v7" php: '7.4' if: NOT type = pull_request env: - DOCKER_PUBLISH="true" + - PLATFORM="linux/arm/v7" + - name: "Docker publish - linux/arm64/v8" + php: '7.4' + if: NOT type = pull_request + env: + - DOCKER_PUBLISH="true" + - PLATFORM="linux/arm64/v8" + - name: "Docker publish - linux/amd64" + php: '7.4' + if: NOT type = pull_request + env: + - DOCKER_PUBLISH="true" + - PLATFORM="linux/amd64" - name: "CI" php: '7.4' env: diff --git a/docker/build b/docker/build index 141b0a8b..728bd216 100755 --- a/docker/build +++ b/docker/build @@ -21,12 +21,12 @@ if [[ ! -z $TRAVIS_TAG ]]; then docker buildx build --push \ --build-arg SHLINK_VERSION=${TRAVIS_TAG#?} \ - --platform linux/arm/v7,linux/arm64/v8,linux/amd64 \ + --platform ${PLATFORM} \ ${TAGS} . # If build branch is develop, build latest (on master, when there's no tag, do not build anything) elif [[ "$TRAVIS_BRANCH" == 'develop' ]]; then docker buildx build --push \ - --platform linux/arm/v7,linux/arm64/v8,linux/amd64 \ + --platform ${PLATFORM} \ -t shlinkio/shlink:latest . fi