working commit

This commit is contained in:
2026-02-04 12:32:54 +02:00
parent 24b9acd678
commit 219a4cb890
17 changed files with 736 additions and 43 deletions
+7 -2
View File
@@ -6,6 +6,8 @@ import (
"os"
"time"
"mstore/pkg/auxutar"
"github.com/google/go-containerregistry/pkg/authn"
"github.com/google/go-containerregistry/pkg/crane"
"github.com/google/go-containerregistry/pkg/name"
@@ -57,20 +59,23 @@ func (cli *Client) PushImage(ctx context.Context, filepath, imagepath string, ti
}
dstdir := makeTmpFileName(filepath)
err = unarchive(filepath, dstdir)
err = auxutar.Unarchive(filepath, dstdir)
if err != nil {
os.RemoveAll(dstdir)
return err
}
image, err := imageLoader(dstdir)
if err != nil {
os.RemoveAll(dstdir)
return err
}
err = crane.Push(image, imagepath, options...)
if err != nil {
return err
}
err = os.RemoveAll(dstdir)
if err != nil {
return err
}
return err
}