elk/.woodpecker.yml

16 lines
606 B
YAML

steps:
- name: build docker
image: docker:25-cli
commands:
- apk add git
- REPO=$(echo "$CI_REPO" | tr '[:upper:]' '[:lower:]')
- VERSION=${CI_COMMIT_TAG#v}
- IFS='.' read -r MAJOR MINOR FIX <<< "$VERSION"
- 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 .
volumes:
- /var/run/docker.sock:/var/run/docker.sock
when:
- repo: nikurasu:elk-test-ci
- event: tag