fix(publish-docker): stamp BUILD_DATE as a UTC build time - #94
Open
scotwells wants to merge 1 commit into
Open
Conversation
BUILD_DATE was github.event.head_commit.timestamp, which is the commit
time in the committer's local UTC offset ("2026-08-26T15:03:21-07:00")
rather than the build time in UTC, and is unset entirely on release
events. Images that surface it verbatim — Milo serves it as buildDate on
/version — report an off-convention timestamp, or none at all for a
tagged release.
Compute it from the build instead, in the ISO8601 UTC form Kubernetes
uses.
andrewb3000
approved these changes
Sep 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
BUILD_DATEisgithub.event.head_commit.timestamp— the commit time in the committer's local UTC offset, not the build time in UTC. It is also unset onreleaseevents, so tagged releases build with an empty value.Images that surface it show the result. Milo serves it on
/version, where the convention is ISO8601 UTC:Change
Compute the timestamp during the build with
date -u, matching the format Kubernetes serves.Every consumer of this workflow that passes
BUILD_DATEthrough picks this up on their next pin bump.