1
0
Fork 0
mirror of https://gitlab.com/famedly/conduit.git synced 2025-09-05 18:41:00 +00:00

Merge branch 'feat/oci-image-timestamp' into 'next'

feat: add commit timestamp to oci-image

Closes #520

See merge request famedly/conduit!769
This commit is contained in:
Samuel Meenzen 2025-08-28 14:34:58 +02:00
commit 4fe568ea61
2 changed files with 9 additions and 0 deletions

View file

@ -61,6 +61,13 @@
# See also `rust-toolchain.toml` # See also `rust-toolchain.toml`
sha256 = "sha256-AJ6LX/Q/Er9kS15bn9iflkUwcgYqRQxiOIL2ToVAXaU="; sha256 = "sha256-AJ6LX/Q/Er9kS15bn9iflkUwcgYqRQxiOIL2ToVAXaU=";
}; };
# The timestamp of the last commit in ISO 8601 format
timestamp = pkgs.lib.strings.trim (builtins.readFile (
pkgs.runCommand "iso-timestamp" {} ''
date -u -d "@${toString inputs.self.lastModified}" +%Y-%m-%dT%H:%M:%SZ > $out
''
));
}); });
in in
inputs.flake-utils.lib.eachDefaultSystem (system: inputs.flake-utils.lib.eachDefaultSystem (system:

View file

@ -3,6 +3,7 @@
, dockerTools , dockerTools
, lib , lib
, pkgs , pkgs
, timestamp
}: }:
let let
# See https://github.com/krallin/tini/pull/223 # See https://github.com/krallin/tini/pull/223
@ -17,6 +18,7 @@ in
dockerTools.buildImage { dockerTools.buildImage {
name = default.pname; name = default.pname;
tag = "next"; tag = "next";
created = timestamp;
copyToRoot = [ copyToRoot = [
dockerTools.caCertificates dockerTools.caCertificates
]; ];