Hello! I'm looking for an operation which let's me do something like
func (m Mod) Promote(ctx context.Context, imageRef string) (string, error) {
// 1. Take an image reference as an input
// 2. Publish under a different tag in an image repository, without creating a new manifest
//
// Something like
return dag.Container().From(imageRef).Publish(ctx, "registry/repo:staging")
}
Called like
dagger call promote --image-ref registry/repo@sha256:{digest}
What I'm finding is that the simple approach always creates a new manifest when the referenced image is not already cached. Is there a recommended approach to only update the registry/repo tag without defaulting to external tool like skopeo ?