diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ccfcbcf7a..0a9d7d63f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -486,22 +486,25 @@ docker: --no-cache --push + - if: $CI_COMMIT_BRANCH =~ /(stable|develop)/ + variables: + BUILD_ARGS: > + --set *.platform=linux/amd64,linux/arm64,linux/arm/v7 + --set *.cache-from=type=registry,ref=$DOCKER_CACHE_IMAGE:$CI_COMMIT_BRANCH,oci-mediatypes=false + --set *.cache-to=type=registry,ref=$DOCKER_CACHE_IMAGE:$CI_COMMIT_BRANCH,mode=max,oci-mediatypes=false + --push + - if: $CI_PIPELINE_SOURCE == "merge_request_event" && $CI_PROJECT_NAMESPACE == "funkwhale" # We don't provide priviledged runners to everyone, so we can only build docker images in the funkwhale group variables: BUILD_ARGS: > - --set *.platform=linux/amd64 + --set *.platform=linux/amd64,linux/arm64,linux/arm/v7 --set *.cache-from=type=registry,ref=$DOCKER_CACHE_IMAGE:$CI_MERGE_REQUEST_TARGET_BRANCH_NAME,oci-mediatypes=false image: $CI_REGISTRY/funkwhale/ci/docker:20 services: - docker:20-dind variables: - BUILD_ARGS: > - --set *.platform=linux/amd64,linux/arm64,linux/arm/v7 - --set *.cache-from=type=registry,ref=$DOCKER_CACHE_IMAGE:$CI_COMMIT_BRANCH,oci-mediatypes=false - --set *.cache-to=type=registry,ref=$DOCKER_CACHE_IMAGE:$CI_COMMIT_BRANCH,mode=max,oci-mediatypes=false - --push <<: *keep_git_files_permissions DOCKER_HOST: tcp://docker:2375/ DOCKER_DRIVER: overlay2