Skip to content

Commit

Permalink
Update container.nix
Browse files Browse the repository at this point in the history
  • Loading branch information
srid authored Nov 8, 2024
1 parent e166536 commit 0938217
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions nix/modules/flake-parts/container.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
"org.opencontainers.image.source" = "https://github.com/srid/emanote";
};
};
in lib.optionalAttrs pkgs.stdenv.isLinux {
in {
# Load the container locally with: `nix build .#container && ./result | podman load`
packages.container = container;
packages = lib.optionalAttrs pkgs.stdenv.isLinux { container = container };

# Run this script in the CI to publish a new image
apps.publish-container-release =
pkgs.writeShellScriptBin "emanote-release" ''
apps = lib.optionalAttrs pkgs.stdenv.isLinux {
publish-container-release = pkgs.writeShellScriptBin "emanote-release" ''
set -e
export PATH=$PATH:${pkgs.gzip}/bin:${pkgs.skopeo}/bin
IMAGE="docker://${container-name}"
Expand All @@ -33,5 +33,6 @@
echo "Tagging latest"
skopeo copy $IMAGE:${emanote.version} $IMAGE:latest
'';
};
};
}

0 comments on commit 0938217

Please sign in to comment.