simulate file 2
Some checks failed
Create and publish a Docker image / build-and-push-image (push) Has been cancelled
Some checks failed
Create and publish a Docker image / build-and-push-image (push) Has been cancelled
This commit is contained in:
parent
925ccc3b9e
commit
6b5a0a4277
12
main.go
12
main.go
@ -14,7 +14,6 @@ import (
|
||||
)
|
||||
|
||||
type AddResponse struct {
|
||||
Bytes int64
|
||||
Hash string
|
||||
Name string
|
||||
Size string
|
||||
@ -126,6 +125,15 @@ func main() {
|
||||
defer fileReader.Close()
|
||||
io.Copy(w, fileReader)
|
||||
|
||||
w, err = mwriter.CreateIpfsFilePart("blog/posts/hosting-static-site-on-ipfs/test.html")
|
||||
if err != nil {
|
||||
githubactions.Fatalf("Unable to create index file part: %v", fmt.Errorf("%w", err))
|
||||
}
|
||||
|
||||
fileReader2, _ := os.Open("blog/posts/hosting-static-site-on-ipfs/test.html")
|
||||
defer fileReader2.Close()
|
||||
io.Copy(w, fileReader2)
|
||||
|
||||
// err = filepath.Walk(path, func(innerPath string, info fs.FileInfo, err error) error {
|
||||
// if err != nil {
|
||||
// return err
|
||||
@ -177,7 +185,7 @@ func main() {
|
||||
var ipfsAddResponse AddResponse
|
||||
json.Unmarshal(resBody, &ipfsAddResponse)
|
||||
|
||||
githubactions.Infof("Upload size is %v", ipfsAddResponse.Bytes)
|
||||
githubactions.Infof("Upload size is %v", ipfsAddResponse.Size)
|
||||
githubactions.Infof("CID is %v", ipfsAddResponse.Hash)
|
||||
githubactions.SetOutput("cid", ipfsAddResponse.Hash)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user