From ff4d5224178cc5c5d42e25b1f6cb01dab708dff7 Mon Sep 17 00:00:00 2001 From: viovanov Date: Wed, 20 Oct 2021 14:46:48 +0300 Subject: [PATCH] Add annotation for creation date when pushing --- pkg/app/push.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/app/push.go b/pkg/app/push.go index 65ec642..88226f1 100644 --- a/pkg/app/push.go +++ b/pkg/app/push.go @@ -2,6 +2,7 @@ package app import ( "net/http" + "time" "github.com/containerd/containerd/remotes/docker" ocispec "github.com/opencontainers/image-spec/specs-go/v1" @@ -66,6 +67,7 @@ func (c *PolicyApp) Push(userRef string) error { }) refDescriptor.Annotations[ocispec.AnnotationTitle] = ref + refDescriptor.Annotations[ocispec.AnnotationCreated] = time.Now().UTC().Format(time.RFC3339) pushDescriptor, err := oras.Push(c.Context, resolver,