feat: push container to gitlab registry

This commit is contained in:
Simon Cornet 2025-10-12 11:13:46 +02:00
commit c065e2855a

View file

@ -1,6 +1,7 @@
--- ---
variables: variables:
STORAGE_DRIVER: "overlay" STORAGE_DRIVER: "overlay"
IMAGE_TAG: "docs-simoncor-net"
stages: stages:
- "build" - "build"
@ -10,17 +11,17 @@ build:
image: "quay.io/buildah/stable:latest" image: "quay.io/buildah/stable:latest"
script: script:
# login # login to container registry
- "echo $CR_PASSWORD | buildah login -u $CR_USERNAME --password-stdin $CR_HOSTNAME" - "echo $CI_REGISTRY_PASSWORD | buildah login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY"
# build image # build image
- "buildah bud -t docs-simoncor-net ." - "buildah bud -t $IMAGE_TAG ."
# tag image # tag image
- "buildah tag docs-simoncor-net cr.simoncor.net/siempie/docs-simoncor-net:latest" - "buildah tag $IMAGE_TAG $CI_REGISTRY_IMAGE:latest"
# push image # push image
- "buildah push cr.simoncor.net/siempie/docs-simoncor-net:latest" - "buildah push $CI_REGISTRY_IMAGE:latest"
# logout # logout
- "buildah logout $CR_HOSTNAME" - "buildah logout $CI_REGISTRY"