mirror of
https://gitflic.ru/project/alt-gnome/karkas.git
synced 2024-12-24 08:34:42 +03:00
34 lines
878 B
YAML
34 lines
878 B
YAML
stages:
|
|
- lint
|
|
- build
|
|
|
|
lint-pre-commit:
|
|
stage: lint
|
|
image: python:3.12-bullseye
|
|
before_script:
|
|
- pip install pre-commit
|
|
scripts:
|
|
- pre-commit run --all-files
|
|
cache:
|
|
paths:
|
|
- .cache/pip
|
|
- .cache/pre-commit
|
|
|
|
build-altlinux:
|
|
stage: build
|
|
image: docker:27.1.2
|
|
variables:
|
|
CI_REGISTRY: registry.gitflic.ru
|
|
IMAGE_NAME: registry.gitflic.ru/project/alt-gnome/karkas/altlinux
|
|
before_script:
|
|
- docker info
|
|
- docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY}
|
|
scripts:
|
|
- |
|
|
cd ./src/altlinux
|
|
export IMAGE_COMMIT=${IMAGE_NAME}:${CI_COMMIT_SHA}
|
|
export IMAGE_BRANCH=${IMAGE_NAME}:$(echo $CI_COMMIT_REF_NAME | sed 's/[^a-zA-Z0-9]/-/g')
|
|
docker build -t ${IMAGE_COMMIT} -t ${IMAGE_BRANCH} -f Dockerfile ../..
|
|
docker push ${IMAGE_COMMIT}
|
|
docker push ${IMAGE_BRANCH}
|