mirror of
https://gitea.com/gitea/runner.git
synced 2026-11-11 10:24:09 +00:00
refactor!: remove the builtin actions (#1407)
Removes `builtin:checkout`, `builtin:upload-artifact` and `builtin:download-artifact`, along with the container helpers only they used. Builtin actions are tied to the runner version, so users cannot pin them, and they diverge from the shareable actions ecosystem that tools like zizmor build on. Workflows should use `actions/checkout`, `actions/upload-artifact` and `actions/download-artifact`, or lightweight third-party actions such as https://github.com/taiki-e/checkout-action. **Breaking:** steps with `uses: builtin:checkout`, released in v4.0.0, now fail and need to switch to one of the actions above. The artifact actions were never released. Docs: https://gitea.com/gitea/docs/pulls/643 Fixes: https://gitea.com/gitea/runner/issues/1405 Co-authored-by: silverwind <[email protected]> Reviewed-on: https://gitea.com/gitea/runner/pulls/1407 Reviewed-by: silverwind <[email protected]> Co-authored-by: bircni <[email protected]>
This commit is contained in:
1 parent
85d007c47f
commit
c59caa9689
54 files changed
+18
-5751
No files matched your search
@@ -213,10 +213,6 @@ func parseKVAndFile(rawKVs []string, filePath string) map[string]string {
|
||||
return result
|
||||
}
|
||||
|
||||
func (i *executeArgs) artifactServerURL() string {
|
||||
return "http://" + net.JoinHostPort(i.artifactServerAddr, i.artifactServerPort)
|
||||
}
|
||||
|
||||
// Workdir returns path to workdir
|
||||
func (i *executeArgs) Workdir() string {
|
||||
return i.resolve(".")
|
||||
@@ -390,7 +386,6 @@ func (i *executeArgs) runnerConfig(eventName string, env, proxyEnv map[string]st
|
||||
ArtifactServerPath: i.artifactServerPath,
|
||||
ArtifactServerPort: i.artifactServerPort,
|
||||
ArtifactServerAddr: i.artifactServerAddr,
|
||||
ResultsURL: i.artifactServerURL(),
|
||||
NoSkipCheckout: i.noSkipCheckout,
|
||||
EventName: eventName,
|
||||
EventJSON: eventJSON,
|
||||
@@ -522,7 +517,7 @@ func runExec(ctx context.Context, execArgs *executeArgs) func(cmd *cobra.Command
|
||||
token := cmp.Or(inheritedToken, artifacts.LocalRuntimeToken(workflowRun, maxLifetime))
|
||||
config.RuntimeTokens[run.Workflow] = token
|
||||
config.ExtraMasks = append(config.ExtraMasks, token)
|
||||
handler.RegisterJob(token, artifactcache.JobCredential{Repo: "__local/__exec", Results: execArgs.artifactServerURL()})
|
||||
handler.RegisterJob(token, artifactcache.JobCredential{Repo: "__local/__exec", Results: "http://" + net.JoinHostPort(execArgs.artifactServerAddr, execArgs.artifactServerPort)})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -628,7 +628,6 @@ func (r *Runner) run(ctx context.Context, task *runnerv1.Task, reporter *report.
|
||||
ClientKeyFile: r.cfg.Runner.ClientKeyFile,
|
||||
CAFile: r.cfg.Runner.CAFile,
|
||||
InstanceTransport: r.instanceTransport,
|
||||
ResultsURL: strings.TrimSuffix(r.client.Address(), "/"),
|
||||
RunnerName: r.name,
|
||||
KubernetesPicker: r.kubernetesOptions,
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user