From 1ea43997653a0e95509841dbbd65ce063b381783 Mon Sep 17 00:00:00 2001 From: nikurasu Date: Mon, 18 Mar 2024 13:34:44 +0100 Subject: [PATCH] feat(ci): Made ci sh compatible (hopefully^^) --- .woodpecker.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 0b8d85b1..e6a4e8f3 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -4,10 +4,12 @@ steps: commands: - apk add git - REPO=$(echo "$CI_REPO" | tr '[:upper:]' '[:lower:]') - - VERSION=${CI_COMMIT_TAG#v} - IFS='.' read -r MAJOR MINOR FIX <<< "$VERSION" + - MAJOR=$(echo ${CI_COMMIT_TAG} | cut -d '.' -f 1 | tr -d 'v') + - MINOR=$(echo ${CI_COMMIT_TAG} | cut -d '.' -2) + - PATCH=$(echo ${CI_COMMIT_TAG} | cut -d '.' -3) - REGISTRY="dev.cat-enby.club" - - docker buildx build -t $${REGISTRY}/$${REPO}:v$${MAJOR:-0}.$${MINOR:-0}.$${FIX-0} -t $${REGISTRY}/$${REPO}:v$${MAJOR:-0}.$${MINOR} $${REGISTRY}/$$REPO:v$${MAJOR:-0} $${REGISTRY}/$$REPO:latest . + - docker buildx build -t $${REGISTRY}/$${REPO}:v$${MAJOR:-0}.$${MINOR:-0}.$${PATCH-0} -t $${REGISTRY}/$${REPO}:v$${MAJOR:-0}.$${MINOR} $${REGISTRY}/$$REPO:v$${MAJOR:-0} $${REGISTRY}/$$REPO:latest . volumes: - /var/run/docker.sock:/var/run/docker.sock when: