docker-with-buildx/.gitlab-ci.yml

15 lines
437 B
YAML
Raw Normal View History

2022-01-26 13:38:37 +03:00
build:
stage: deploy
only:
2022-01-26 17:26:48 +03:00
- /^v*$/
except:
- branches
2022-01-26 13:38:37 +03:00
services:
- docker:dind
before_script:
- echo "$CI_REGISTRY_PASSWORD" | docker login $CI_REGISTRY --username $CI_REGISTRY_USER --password-stdin
script:
2022-01-26 17:24:53 +03:00
- docker build --no-cache -t "$CI_REGISTRY_IMAGE:latest" -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG" .
2022-01-26 13:38:37 +03:00
- docker push "$CI_REGISTRY_IMAGE:latest"
- docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG"