forked from Mirrors/elk
feat(ci): Add build tags
This commit is contained in:
parent
498face3cf
commit
7b10620cca
1 changed files with 5 additions and 2 deletions
|
@ -1,10 +1,13 @@
|
||||||
pipeline:
|
steps:
|
||||||
- name: build docker
|
- name: build docker
|
||||||
image: docker:25-cli
|
image: docker:25-cli
|
||||||
commands:
|
commands:
|
||||||
- apk add git
|
- apk add git
|
||||||
- REPO=$(echo "$CI_REPO" | tr '[:upper:]' '[:lower:]')
|
- REPO=$(echo "$CI_REPO" | tr '[:upper:]' '[:lower:]')
|
||||||
- docker buildx build -t dev.cat-enby.club/$${REPO}:$CI_COMMIT_TAG .
|
- 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:
|
volumes:
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
when:
|
when:
|
||||||
|
|
Loading…
Reference in a new issue