This repository has been archived on 2025-03-03. You can view files and clone it, but cannot push or open issues or pull requests.
facturio/.gitlab-ci.yml
2024-08-17 21:44:04 +02:00

27 lines
668 B
YAML

stages:
- linting
- testing
- build
- staging
- production
default:
image: python:3.12-slim
before_script:
- docker login ${CI_REGISTRY} -u gitlab-ci-token -p ${CI_JOB_TOKEN}
build_image:
stage: build
image: docker
services:
- docker
variables:
CONTAINER_NAME: ${CI_REGISTRY_IMAGE}/facturio
script:
- docker build -t ${CONTAINER_NAME}:${CI_COMMIT_REF_NAME} .
- docker push ${CONTAINER_NAME}:${CI_COMMIT_REF_NAME}
- |
if [[ -n "${CI_COMMIT_TAG}" ]]; then
docker tag ${CONTAINER_NAME}:${CI_COMMIT_REF_NAME} ${CONTAINER_NAME}:${CI_COMMIT_TAG}
docker push ${CONTAINER_NAME}:${CI_COMMIT_TAG}
fi