github_packages: fix org.opencontainers.image.created.

This commit is contained in:
Mike McQuaid 2021-03-31 21:13:29 +01:00
parent d9032ff01a
commit 4f57adf42f
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70
2 changed files with 4 additions and 2 deletions

View File

@ -538,6 +538,7 @@ module Homebrew
"prefix" => bottle.prefix,
"cellar" => bottle.cellar.to_s,
"rebuild" => bottle.rebuild,
"date" => Time.now.strftime("%F"),
"tags" => {
bottle_tag.to_s => {
"filename" => filename.bintray,

View File

@ -177,8 +177,9 @@ class GitHubPackages
remote
end
created_date = bottle_hash["bottle"]["date"]
formula_annotations_hash = {
"org.opencontainers.image.created" => Time.now.strftime("%F"),
"org.opencontainers.image.created" => created_date,
"org.opencontainers.image.description" => bottle_hash["formula"]["desc"],
"org.opencontainers.image.documentation" => documentation,
"org.opencontainers.image.license" => bottle_hash["formula"]["license"],
@ -225,7 +226,7 @@ class GitHubPackages
tag = "#{version}.#{bottle_tag}#{rebuild}"
annotations_hash = formula_annotations_hash.merge({
"org.opencontainers.image.created" => Time.at(tag_hash["tab"]["source_modified_time"]).strftime("%F"),
"org.opencontainers.image.created" => created_date,
"org.opencontainers.image.documentation" => documentation,
"org.opencontainers.image.ref.name" => tag,
"org.opencontainers.image.title" => "#{formula_full_name} #{tag}",