Update .gitlab-ci.yml file

This commit is contained in:
Slava
2024-03-20 20:16:34 +00:00
parent 877348711e
commit f33ec2fc20

View File

@@ -67,16 +67,25 @@ qodana:
paths: paths:
- ".qodana/results/" - ".qodana/results/"
build: docker-build:
image: docker:latest
needs: ['pytest', 'qodana']
stage: build stage: build
needs: [ 'pytest' ] services:
- docker:dind
before_script: before_script:
- df - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
- cat /etc/resolv.conf
- cat /etc/hosts
script: script:
- docker build -t disord-bot-pisya . - |
if [[ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]]; then
tag=""
echo "Running on default branch '$CI_DEFAULT_BRANCH': tag = 'latest'"
else
tag=":$CI_COMMIT_REF_SLUG"
echo "Running on branch '$CI_COMMIT_BRANCH': tag = $tag"
fi
- docker build --pull -t "$CI_REGISTRY_IMAGE${tag}" .
push: push: