Update .gitlab-ci.yml file

This commit is contained in:
Sylvain Briat 2023-04-05 09:55:20 +00:00
parent f16508f8e5
commit b108e04890
1 changed files with 2 additions and 0 deletions

View File

@ -40,6 +40,7 @@ build:
- echo -n $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
script:
- export VERSION=$(docker run --rm -v "$PWD":/usr/src/app:ro -w /usr/src/app node:slim node -p "require('./package.json').version")
- echo $VERSION
- docker pull $CI_REGISTRY_IMAGE:latest || true
- >
docker build
@ -48,6 +49,7 @@ build:
--tag $CI_REGISTRY_IMAGE:$VERSION
--tag $CI_REGISTRY_IMAGE:latest
.
- docker image ls
- docker push $CI_REGISTRY_IMAGE
only:
- main