feat-add-woodpecker #1

Merged
Nikurasu merged 16 commits from feat-add-woodpecker into main 2024-03-18 13:42:55 +00:00
Showing only changes of commit 1ea4399765 - Show all commits

View file

@ -4,10 +4,12 @@ steps:
commands: commands:
- apk add git - apk add git
- REPO=$(echo "$CI_REPO" | tr '[:upper:]' '[:lower:]') - REPO=$(echo "$CI_REPO" | tr '[:upper:]' '[:lower:]')
- VERSION=${CI_COMMIT_TAG#v}
- IFS='.' read -r MAJOR MINOR FIX <<< "$VERSION" - 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" - 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: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
when: when: