File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -121,11 +121,21 @@ func main() {
121
121
log .Printf ("Destination %s was resolved to %s after stamping." , * dst , stamped )
122
122
}
123
123
124
+ digest , err := img .Digest ()
125
+ if err != nil {
126
+ log .Printf ("Failed to digest image: %v" , err )
127
+ }
128
+
124
129
if err := push (stamped , img ); err != nil {
125
130
log .Fatalf ("Error pushing image to %s: %v" , stamped , err )
126
131
}
127
132
128
- log .Printf ("Successfully pushed %s image to %s" , * format , stamped )
133
+ digestStr := ""
134
+ if ! strings .Contains (stamped , "@" ) {
135
+ digestStr = fmt .Sprintf (" - %s@%s" , strings .Split (stamped , ":" )[0 ], digest )
136
+ }
137
+
138
+ log .Printf ("Successfully pushed %s image to %s%s" , * format , stamped , digestStr )
129
139
}
130
140
131
141
// digestExists checks whether an image's digest exists in a repository.
You can’t perform that action at this time.
0 commit comments