Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/upload artifact error windows #27802

Merged
merged 9 commits into from
Oct 30, 2023
4 changes: 2 additions & 2 deletions routers/api/actions/artifacts_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

"code.gitea.io/gitea/models/actions"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/util"
)

const (
Expand Down Expand Up @@ -58,7 +57,8 @@
func parseArtifactItemPath(ctx *ArtifactContext) (string, string, bool) {
// itemPath is generated from upload-artifact action
// it's formatted as {artifact_name}/{artfict_path_in_runner}
itemPath := util.PathJoinRel(ctx.Req.URL.Query().Get("itemPath"))
// act_runner in host mode on Windows, itemPath is joined by Windows slash '\'
itemPath := util.PathJoinRelX(ctx.Req.URL.Query().Get("itemPath"))

Check failure on line 61 in routers/api/actions/artifacts_utils.go

View workflow job for this annotation

GitHub Actions / lint-go-windows

undefined: util (typecheck)

Check failure on line 61 in routers/api/actions/artifacts_utils.go

View workflow job for this annotation

GitHub Actions / lint-go-windows

undefined: util) (typecheck)

Check failure on line 61 in routers/api/actions/artifacts_utils.go

View workflow job for this annotation

GitHub Actions / lint-backend

undefined: util (typecheck)

Check failure on line 61 in routers/api/actions/artifacts_utils.go

View workflow job for this annotation

GitHub Actions / lint-backend

undefined: util) (typecheck)

Check failure on line 61 in routers/api/actions/artifacts_utils.go

View workflow job for this annotation

GitHub Actions / checks-backend

undefined: util

Check failure on line 61 in routers/api/actions/artifacts_utils.go

View workflow job for this annotation

GitHub Actions / lint-go-gogit

undefined: util (typecheck)

Check failure on line 61 in routers/api/actions/artifacts_utils.go

View workflow job for this annotation

GitHub Actions / lint-go-gogit

undefined: util) (typecheck)

Check failure on line 61 in routers/api/actions/artifacts_utils.go

View workflow job for this annotation

GitHub Actions / backend

undefined: util

Check failure on line 61 in routers/api/actions/artifacts_utils.go

View workflow job for this annotation

GitHub Actions / test-e2e

undefined: util

Check failure on line 61 in routers/api/actions/artifacts_utils.go

View workflow job for this annotation

GitHub Actions / test-mysql

undefined: util

Check failure on line 61 in routers/api/actions/artifacts_utils.go

View workflow job for this annotation

GitHub Actions / test-mssql

undefined: util

Check failure on line 61 in routers/api/actions/artifacts_utils.go

View workflow job for this annotation

GitHub Actions / test-pgsql

undefined: util

Check failure on line 61 in routers/api/actions/artifacts_utils.go

View workflow job for this annotation

GitHub Actions / test-sqlite

undefined: util

Check failure on line 61 in routers/api/actions/artifacts_utils.go

View workflow job for this annotation

GitHub Actions / test-unit

undefined: util
artifactName := strings.Split(itemPath, "/")[0]
artifactPath := strings.TrimPrefix(itemPath, artifactName+"/")
if !validateArtifactHash(ctx, artifactName) {
Expand Down
Loading