13 lines
373 B
YAML
13 lines
373 B
YAML
# Official docker image.
|
|
image: docker:latest
|
|
|
|
services:
|
|
- docker:dind
|
|
|
|
build:
|
|
stage: build
|
|
script:
|
|
- export IMAGE_TAG=$(echo -en $CI_COMMIT_REF_NAME | tr -c '[:alnum:]_.-' '-')
|
|
- docker login -u "gitlab-ci-token" -p "$CI_JOB_TOKEN" $CI_REGISTRY
|
|
- docker build --pull -t "$CI_REGISTRY_IMAGE:$IMAGE_TAG" .
|
|
- docker push "$CI_REGISTRY_IMAGE:$IMAGE_TAG"
|