A bit more logging
All checks were successful
Create and publish a Docker image / build-and-push-image (push) Successful in 1m20s

This commit is contained in:
Alexandre Bruyant 2024-01-07 12:58:46 +01:00
parent 8a5edd39b1
commit 24294064bf

11
main.go
View File

@ -87,14 +87,17 @@ func main() {
return err
}
in, err := os.Open(innerPath)
fileReader, err := os.Open(innerPath)
if err != nil {
return err
}
defer in.Close()
defer fileReader.Close()
if written, err := io.Copy(w, in); err != nil {
written, err := io.Copy(w, fileReader)
if err != nil {
return fmt.Errorf("error copying %s (%d bytes written): %v", relativeParh, written, err)
} else {
githubactions.Infof("Read %v bytes from %s", written, relativeParh)
}
return nil
@ -118,6 +121,8 @@ func main() {
githubactions.Fatalf(err.Error())
}
githubactions.Infof("Response: %v", resBody)
var ipfsAddResponse AddResponse
json.Unmarshal(resBody, &ipfsAddResponse)