2024-03-18 12:26:08 +00:00
|
|
|
steps:
|
2024-03-16 14:33:04 +00:00
|
|
|
- name: build docker
|
|
|
|
image: docker:25-cli
|
|
|
|
commands:
|
2024-03-16 14:48:38 +00:00
|
|
|
- apk add git
|
2024-03-16 14:52:25 +00:00
|
|
|
- REPO=$(echo "$CI_REPO" | tr '[:upper:]' '[:lower:]')
|
2024-03-18 12:26:08 +00:00
|
|
|
- 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 .
|
2024-03-16 14:33:04 +00:00
|
|
|
volumes:
|
|
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
|
|
when:
|
|
|
|
- repo: nikurasu:elk-test-ci
|
|
|
|
- event: tag
|