From 9d006a1768caf95654620b289f33cab787184b60 Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Tue, 25 Nov 2025 16:38:12 -0600 Subject: [PATCH] Build and push together --- .gitlab-ci.yml | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a75693f..293c6d9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -25,37 +25,26 @@ default: "Build image": stage: build + tags: + - kubernetes + image: "nixos/nix:latest" parallel: ¶llel matrix: - IMG: - img-bitwarden - img-immich - artifacts: - paths: - - "*.tar.gz" script: - nix build ".#${IMG}" - cp -L result "${IMG}.tar.gz" - -"Push Image": - stage: push - parallel: *parallel - dependencies: - - "Build image" - image: "quay.io/podman/stable" - services: - - "docker:28-dind" - tags: - - kubernetes - script: + - nix build "nixpkgs#podman" --out-link podman - >- - podman login + ./podman/bin/podman login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY" - - podman load -i "${IMG}.tar.gz" + - ./podman/bin/podman load -i "${IMG}.tar.gz" - >- - podman tag + ./podman/bin/podman tag "localhost/${IMG}:latest" "$CI_REGISTRY/greg/nixos-config/${IMG}:latest" - - podman push "$CI_REGISTRY/greg/nixos-config/${IMG}:latest" + - ./podman/bin/podman push "$CI_REGISTRY/greg/nixos-config/${IMG}:latest"