Tom/.gitlab-ci.yml
2021-07-27 23:09:23 +02:00

22 lines
769 B
YAML

stages:
- build
- test
- deploy
services:
- docker:stable-dind
docker-build:
image: docker:stable
stage: build
script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker pull registry.gitlab.com/confreriedukassoulait/twitchbot:latest || true
- docker build --cache-from registry.gitlab.com/confreriedukassoulait/twitchbot:latest -t twitchbot .
- docker tag twitchbot:latest registry.gitlab.com/confreriedukassoulait/twitchbot:${CI_COMMIT_SHORT_SHA}
- docker tag twitchbot:latest registry.gitlab.com/confreriedukassoulait/twitchbot:latest
- docker push registry.gitlab.com/confreriedukassoulait/twitchbot:${CI_COMMIT_SHORT_SHA}
- docker push registry.gitlab.com/confreriedukassoulait/twitchbot:latest