From 14e42cffbfb7d706a147d101fc9ff18bd40c5278 Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Sun, 28 Sep 2025 22:06:50 -0500 Subject: [PATCH] Split build and push --- .gitlab-ci.yml | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7fcc454..9ebdfcf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,6 @@ stages: - build + - push - deploy build: @@ -8,11 +9,23 @@ build: tags: - kubernetes script: - - nix --extra-experimental-features nix-command --extra-experimental-features flakes run ".#podman" -- login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - - nix --extra-experimental-features nix-command --extra-experimental-features flakes build . - - nix --extra-experimental-features nix-command --extra-experimental-features flakes run ".#podman" -- load -i result - - nix --extra-experimental-features nix-command --extra-experimental-features flakes run ".#podman" -- tag "localhost/gregs-homepage:latest" $CI_REGISTRY/greg/homepage/gregs-homepage:latest - - nix --extra-experimental-features nix-command --extra-experimental-features flakes run ".#podman" -- push $CI_REGISTRY/greg/homepage/gregs-homepage:latest + - nix build . + - cp -L result result.tar.gz + artifacts: + paths: + - result.tar.gz + expire_in: "1 week" + +push: + stage: push + image: "quay.io/podman/stable" + tags: + - kubernetes + script: + - podman login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY + - podman load -i result.tar.gz + - podman tag "localhost/gregs-homepage:latest" $CI_REGISTRY/greg/homepage/gregs-homepage:latest + - podman push $CI_REGISTRY/greg/homepage/gregs-homepage:latest deploy: stage: deploy