Skip to content
Snippets Groups Projects
Commit 7f061e3b authored by philingood's avatar philingood
Browse files

Update .gitlab-ci.yml file

parent 60be6cd5
Branches main
No related tags found
No related merge requests found
Pipeline #20374 failed
variables:
DOCKER_TLS_CERTDIR: "/certs"
docker-build:
stage: build
image: docker:cli
services:
- docker:dind
before_script:
- echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER $CI_REGISTRY --password-stdin
script:
- docker build --pull -t "$DOCKER_IMAGE_NAME" .
- docker push "$DOCKER_IMAGE_NAME"
- |
if [[ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]]; then
docker tag "$DOCKER_IMAGE_NAME" "$CI_REGISTRY_IMAGE:latest"
docker push "$CI_REGISTRY_IMAGE:latest"
fi
rules:
- if: $CI_COMMIT_BRANCH
exists:
- Dockerfile
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment