add more things to ci

This commit is contained in:
Maple 2025-10-16 14:36:42 +02:00
commit 7998135097

View file

@ -2,14 +2,35 @@ default:
image: docker:28.5.1-dind
services:
- "docker:28.5.1-dind"
before-script:
- git submodule update --init
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
variables:
DOCKER_TLS_CERTDIR: "/certs"
IMAGE_NAME: "ci.virintox.com/spfn/splatie"
IMAGE_TAG: "${CI_COMMIT_REF_SLUG}"
stages:
- build
build:
stage: build
- build-image
- push
test:
image: rust:alpine3.22
script:
- docker build .
stage: push
- apk add openssl-dev
- cargo test
build-image:
stage: build-image
script:
- docker build -t "$CI_REGISTRY_IMAGE:$IMAGE_TAG" .
- docker push "$CI_REGISTRY_IMAGE:$IMAGE_TAG"
push-retagged-latest:
stage: push-retagged-latest
script:
- docker pull "$CI_REGISTRY_IMAGE:$IMAGE_TAG"
- docker push "$CI_REGISTRY_IMAGE:latest"
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: on_success