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:37:51 +00:00
|
|
|
- REGISTRY="dev.cat-enby.club"
|
2024-03-18 12:34:44 +00:00
|
|
|
- MAJOR=$(echo ${CI_COMMIT_TAG} | cut -d '.' -f 1 | tr -d 'v')
|
2024-03-18 12:39:40 +00:00
|
|
|
- MINOR=$(echo ${CI_COMMIT_TAG} | cut -d '.' -f 2)
|
|
|
|
- PATCH=$(echo ${CI_COMMIT_TAG} | cut -d '.' -f 3)
|
2024-03-18 12:41:39 +00:00
|
|
|
- docker buildx build -t $${REGISTRY}/$${REPO}:v$${MAJOR:-0}.$${MINOR:-0}.$${PATCH-0} -t $${REGISTRY}/$${REPO}:v$${MAJOR:-0}.$${MINOR} -t $${REGISTRY}/$$REPO:v$${MAJOR:-0} -t $${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
|