fix(exec): serve the v4 artifact API so upload-artifact v4 and later work (#1341)

`exec` forwarded the toolkit's ArtifactService calls to an instance it never registered, and its random runtime token held no backend IDs, so `actions/upload-artifact` and `actions/download-artifact` v4 and later failed.

The local artifact server now serves the v4 API, including the single Put Blob uploads docker/build-push-action uses. `exec` gives each workflow its own unsigned JWT runtime token and artifact run, so artifact names conflict and carry over between runs as on GitHub. Artifacts default to a temporary directory instead of the workspace that jobs copy.

Co-authored-by: silverwind <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
Reviewed-on: https://gitea.com/gitea/runner/pulls/1341
Reviewed-by: Lunny Xiao <[email protected]>
Reviewed-by: silverwind <[email protected]>
Co-authored-by: bircni <[email protected]>
This commit is contained in:
authored and silverwind committed 2026-10-28 03:52:53 +00:00
1 parent a76ccd7020
commit d77e216674
16 files changed
+630 -30

No files matched your search

+6 -1
View File
@@ -332,5 +332,10 @@ func getWorkflowSecrets(rc *RunContext) map[string]string {
if rc.caller != nil {
return rc.workflowCallSecrets
}
return rc.Config.Secrets
if rc.runtimeToken == "" {
return rc.Config.Secrets
}
secrets := map[string]string{"ACTIONS_RUNTIME_TOKEN": rc.runtimeToken} // as the daemon exposes its token
maps.Copy(secrets, rc.Config.Secrets)
return secrets
}