From fd0385d33a4d8753ce403e1d9f4f30c96348f7ed Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Sat, 17 Feb 2024 15:36:23 +0100 Subject: [PATCH] ci: new build step --- .woodpecker/build.yml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/.woodpecker/build.yml b/.woodpecker/build.yml index ddcbe53..f9eb4e6 100644 --- a/.woodpecker/build.yml +++ b/.woodpecker/build.yml @@ -36,23 +36,22 @@ steps: commands: - cat .variables - source .variables + # https://unix.stackexchange.com/questions/748633/error-multiple-platforms-feature-is-currently-not-supported-for-docker-driver + - docker buildx create --use --platform=linux/amd64 --name multi-platform-builder + - docker buildx inspect --bootstrap - | docker buildx build \ - --tag registry.mgrote.net/$CI_REPO_NAME \ - --tag registry.mgrote.net/$CI_REPO_NAME:${CI_COMMIT_SHA:0:8} \ - --tag registry.mgrote.net/$CI_REPO_NAME:${CI_COMMIT_BRANCH} \ - --tag registry.mgrote.net/$CI_REPO_NAME:latest \ - --tag registry.mgrote.net/$CI_REPO_NAME:$VERSION \ + --platform=linux/amd64 \ + --push \ + --tag registry.mgrote.net/${CI_REPO_NAME}:${CI_COMMIT_SHA:0:8} \ + --tag registry.mgrote.net/${CI_REPO_NAME}:${CI_COMMIT_BRANCH} \ + --tag registry.mgrote.net/${CI_REPO_NAME}:latest \ + --tag registry.mgrote.net/${CI_REPO_NAME}:$VERSION \ --label org.opencontainers.image.url=$CI_REPO_URL \ --label org.opencontainers.image.source=$CI_REPO_URL \ --label org.opencontainers.image.revision=$CI_COMMIT_SHA \ --label org.opencontainers.image.created=$DATE \ --file Dockerfile . - - docker push registry.mgrote.net/$CI_REPO_NAME:${CI_COMMIT_SHA:0:8} - - docker push registry.mgrote.net/$CI_REPO_NAME:${CI_COMMIT_BRANCH} - - docker push registry.mgrote.net/$CI_REPO_NAME:latest - - docker push registry.mgrote.net/$CI_REPO_NAME:$VERSION - - docker push registry.mgrote.net/$CI_REPO_NAME when: - evaluate: 'CI_COMMIT_AUTHOR_EMAIL != "renovate@mgrote.net"' ...