24 lines
1.0 KiB
YAML
24 lines
1.0 KiB
YAML
stages:
|
|
- build
|
|
- deploy
|
|
|
|
build:
|
|
stage: build
|
|
image: "nixos/nix:latest"
|
|
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
|
|
|
|
deploy:
|
|
stage: deploy
|
|
tags:
|
|
- deploy
|
|
script:
|
|
- sudo podman pull $CI_REGISTRY/greg/homepage/gregs-homepage:latest
|
|
- sudo systemctl restart podman-homepage
|