mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	Actions Artifacts v4 backend (#28965)
Fixes #28853 Needs both https://gitea.com/gitea/act_runner/pulls/473 and https://gitea.com/gitea/act_runner/pulls/471 on the runner side and patched `actions/upload-artifact@v4` / `actions/download-artifact@v4`, like `christopherhx/gitea-upload-artifact@v4` and `christopherhx/gitea-download-artifact@v4`, to not return errors due to GHES not beeing supported yet.
This commit is contained in:
		| @@ -43,6 +43,17 @@ func validateRunID(ctx *ArtifactContext) (*actions.ActionTask, int64, bool) { | ||||
| 	return task, runID, true | ||||
| } | ||||
|  | ||||
| func validateRunIDV4(ctx *ArtifactContext, rawRunID string) (*actions.ActionTask, int64, bool) { | ||||
| 	task := ctx.ActionTask | ||||
| 	runID, err := strconv.ParseInt(rawRunID, 10, 64) | ||||
| 	if err != nil || task.Job.RunID != runID { | ||||
| 		log.Error("Error runID not match") | ||||
| 		ctx.Error(http.StatusBadRequest, "run-id does not match") | ||||
| 		return nil, 0, false | ||||
| 	} | ||||
| 	return task, runID, true | ||||
| } | ||||
|  | ||||
| func validateArtifactHash(ctx *ArtifactContext, artifactName string) bool { | ||||
| 	paramHash := ctx.Params("artifact_hash") | ||||
| 	// use artifact name to create upload url | ||||
|   | ||||
		Reference in New Issue
	
	Block a user