stages: - build - test - deploy services: - docker:stable-dind docker-build: image: docker:stable stage: build script: - 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