Split build and push

This commit is contained in:
Greg Hellings
2025-09-28 22:06:50 -05:00
parent 1141ec5857
commit 14e42cffbf
+18 -5
View File
@@ -1,5 +1,6 @@
stages: stages:
- build - build
- push
- deploy - deploy
build: build:
@@ -8,11 +9,23 @@ build:
tags: tags:
- kubernetes - kubernetes
script: 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 build .
- nix --extra-experimental-features nix-command --extra-experimental-features flakes build . - cp -L result result.tar.gz
- nix --extra-experimental-features nix-command --extra-experimental-features flakes run ".#podman" -- load -i result artifacts:
- nix --extra-experimental-features nix-command --extra-experimental-features flakes run ".#podman" -- tag "localhost/gregs-homepage:latest" $CI_REGISTRY/greg/homepage/gregs-homepage:latest paths:
- nix --extra-experimental-features nix-command --extra-experimental-features flakes run ".#podman" -- push $CI_REGISTRY/greg/homepage/gregs-homepage:latest - 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: deploy:
stage: deploy stage: deploy