Merge pull request #772 from acelaya-forks/feature/separate-docker-builds

Separated docker builds in different platforms
This commit is contained in:
Alejandro Celaya 2020-05-16 15:15:47 +02:00 committed by GitHub
commit 3c3a30cc0e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 3 deletions

View file

@ -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:

View file

@ -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