Fix leading slash
All checks were successful
Create and publish a Docker image / build-and-push-image (push) Successful in 1m19s

This commit is contained in:
Alexandre Bruyant 2024-01-06 22:43:35 +01:00
parent 6588bd2d45
commit 8a5edd39b1

View File

@ -9,7 +9,6 @@ import (
"net/http" "net/http"
"os" "os"
"path/filepath" "path/filepath"
"strings"
"github.com/sethvargo/go-githubactions" "github.com/sethvargo/go-githubactions"
) )
@ -78,11 +77,10 @@ func main() {
} }
if info.IsDir() { if info.IsDir() {
githubactions.Infof("Skipping directory %v", innerPath)
return nil return nil
} }
relativeParh := strings.TrimPrefix(innerPath, path) relativeParh, _ := filepath.Rel(path, innerPath)
githubactions.Infof("Reading %v", relativeParh) githubactions.Infof("Reading %v", relativeParh)
w, err := mwriter.CreateFormFile("file", relativeParh) w, err := mwriter.CreateFormFile("file", relativeParh)
if err != nil { if err != nil {