docker-bookstack/.gitlab-ci.yml

20 lines
No EOL
530 B
YAML

workflow:
rules:
- if: '$CI_COMMIT_TAG'
stages:
- build
default:
image: docker
services:
- docker:dind
buildAndPush:
stage: build
before_script:
- "echo $CI_REGISTRY_PASSWORD | docker login $CI_REGISTRY --username $CI_REGISTRY_USER --password-stdin"
- "docker info"
script:
- "docker build . --file Dockerfile --tag ${CI_REGISTRY_IMAGE}:latest --tag ${CI_REGISTRY_IMAGE}:${CI_COMMIT_TAG#'v'}" # that weird thing #'v' thing strips a prefix of v
- "docker push --all-tags $CI_REGISTRY_IMAGE"