docker-with-buildx/.gitlab-ci.yml
Struchkov Mark 368b20acc9 image
2022-01-26 14:32:33 +00:00

17 lines
460 B
YAML

image: docker:latest
build:
stage: deploy
only:
- /^v.*$/
except:
- branches
services:
- docker:dind
before_script:
- echo "$CI_REGISTRY_PASSWORD" | docker login $CI_REGISTRY --username $CI_REGISTRY_USER --password-stdin
script:
- docker build --no-cache -t "$CI_REGISTRY_IMAGE:latest" -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG" .
- docker push "$CI_REGISTRY_IMAGE:latest"
- docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG"