add script to release a container image

This commit is contained in:
Pim Kunis 2024-04-26 21:02:29 +02:00
parent 36c22e9a36
commit aacf26d71e
2 changed files with 12 additions and 1 deletions

View file

@ -25,7 +25,7 @@ in
{ {
packages.blog-pim = pkgs.dockerTools.buildLayeredImage { packages.blog-pim = pkgs.dockerTools.buildLayeredImage {
name = "blog-pim"; name = "blog-pim";
tag = "test"; # TODO: what is the best way to tag this? tag = "latest";
contents = [ contents = [
pkgs.fakeNss pkgs.fakeNss

11
release.sh Executable file
View file

@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
BLOGPIMPATH=$(nix build .#packages.x86_64-linux.blog-pim --print-out-paths --no-link)
GITREV=$(git rev-parse HEAD)
docker load < $BLOGPIMPATH
docker tag blog-pim:latest git.kun.is/home/blog-pim:$GITREV
docker push git.kun.is/home/blog-pim:$GITREV