fix(CI): MàJ du fichier .gitlab-ci.yml

master 0.3.1
Olivier DOSSMANN 2024-05-12 17:40:08 +00:00
parent c42584f401
commit 4578e39c2d
1 changed files with 14 additions and 8 deletions

View File

@ -1,23 +1,29 @@
image: docker:stable
variables:
DOCKER_HOST: tcp://docker:2375/
DOCKER_DRIVER: overlay2
image: docker:cli
services:
- docker:dind
stages:
- build
- deploy
build:
stage: build
script:
- docker build -t $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG .
# Run this job in a branch where a Dockerfile exists
rules:
- if: $CI_COMMIT_BRANCH
exists:
- Dockerfile
deploy:
stage: deploy
script:
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
tags:
- docker
only:
- tags
after_script:
- docker images --filter "dangling=true" -q --no-trunc | xargs -r docker rmi
when: on_success