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:40:27 +02:00

25 lines
665 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
script:
- docker build -t ${CI_REGISTRY_IMAGE}/facturio:${CI_COMMIT_REF_NAME} .
- docker push ${CI_REGISTRY_IMAGE}/facturio:${CI_COMMIT_REF_NAME}
- |
if [[ -z "${CI_COMMIT_TAG}" ]]; then
docker tag ${CI_REGISTRY_IMAGE}/facturio:${CI_COMMIT_REF_NAME} ${CI_REGISTRY_IMAGE}/facturio:${CI_COMMIT_TAG}
docker push ${CI_REGISTRY_IMAGE}/facturio:${CI_COMMIT_TAG}
fi