From dad643d784af7e0190162828fc323232b23a066e Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Fri, 9 Feb 2024 11:10:35 +0100 Subject: [PATCH] ci: same --- .woodpecker/build.yml | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/.woodpecker/build.yml b/.woodpecker/build.yml index 191f8cc..00b9b3c 100644 --- a/.woodpecker/build.yml +++ b/.woodpecker/build.yml @@ -32,6 +32,10 @@ steps: - | DATE=$(date --iso-8601=seconds) echo "DATE=$DATE" >> .variables + # set name + - | + NAME=$NAME + echo "NAME=$NAME" >> .variables build_and_push: # damit dieser Step laufen kann muss das Repo in der Woodpecker-GUI "privilegiert" sein image: "docker:25.0.3" @@ -42,21 +46,21 @@ steps: - source .variables - | docker buildx build \ - --tag registry.mgrote.net/*NAME \ - --tag registry.mgrote.net/*NAME:${CI_COMMIT_SHA:0:8} \ - --tag registry.mgrote.net/*NAME:${CI_COMMIT_BRANCH} \ - --tag registry.mgrote.net/*NAME:latest \ - --tag registry.mgrote.net/*NAME:$VERSION \ + --tag registry.mgrote.net/$NAME \ + --tag registry.mgrote.net/$NAME:${CI_COMMIT_SHA:0:8} \ + --tag registry.mgrote.net/$NAME:${CI_COMMIT_BRANCH} \ + --tag registry.mgrote.net/$NAME:latest \ + --tag registry.mgrote.net/$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/*NAME:${CI_COMMIT_SHA:0:8} - - docker push registry.mgrote.net/*NAME:${CI_COMMIT_BRANCH} - - docker push registry.mgrote.net/*NAME:latest - - docker push registry.mgrote.net/*NAME:$VERSION - - docker push registry.mgrote.net/*NAME + - docker push registry.mgrote.net/$NAME:${CI_COMMIT_SHA:0:8} + - docker push registry.mgrote.net/$NAME:${CI_COMMIT_BRANCH} + - docker push registry.mgrote.net/$NAME:latest + - docker push registry.mgrote.net/$NAME:$VERSION + - docker push registry.mgrote.net/$NAME when: - evaluate: 'CI_COMMIT_AUTHOR_EMAIL != "renovate@mgrote.net"' ...