mirror of
https://gitea.com/gitea/act_runner.git
synced 2026-08-07 09:24:22 +02:00
refactor: move act/model and act/exprparser to actionslib
Gitea needs the workflow model and the expression evaluator to parse workflows and to build the task payload this runner consumes, so it had to depend on gitea.com/gitea/runner for it. Both packages now live in gitea.dev/actionslib, the module both sides already share, and this repository consumes them from there. The GithubContext helpers that need a git checkout on disk (SetRef, SetSha and SetRepositoryAndOwner) are not moved: they are runner only and would drag a git client and the act context logger into the shared module. They become functions of the new act/ghcontext package, together with their tests. act/common.CartesianProduct moved to the shared model package as well, act/model was its only user. act/model/testdata/container-volumes is now act/runner/testdata/container-volumes, its only user is runner_test.go. The x-runner-uuid and x-runner-token header names come from actionslib too, so the runner and Gitea cannot drift apart. The generated runner API code moved along with the repository, from gitea.dev/actions-proto-go to gitea.dev/actionslib, so the imports of ping/v1 and runner/v1 follow the new module path. Both cannot be used at once: the generated types would no longer be the same types. Signed-off-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
4
go.mod
4
go.mod
@@ -7,7 +7,7 @@ toolchain go1.26.5
|
||||
require (
|
||||
connectrpc.com/connect v1.20.0
|
||||
dario.cat/mergo v1.0.2
|
||||
gitea.dev/actions-proto-go v0.6.0
|
||||
gitea.dev/actionslib v0.6.1-0.20260806221014-d5dbc3fc1f21
|
||||
github.com/avast/retry-go/v5 v5.0.0
|
||||
github.com/containerd/errdefs v1.0.0
|
||||
github.com/creack/pty v1.1.24
|
||||
@@ -30,7 +30,6 @@ require (
|
||||
github.com/opencontainers/selinux v1.15.1
|
||||
github.com/prometheus/client_golang v1.24.1
|
||||
github.com/prometheus/client_model v0.6.2
|
||||
github.com/rhysd/actionlint v1.7.12
|
||||
github.com/sirupsen/logrus v1.9.4
|
||||
github.com/spf13/cobra v1.10.2
|
||||
github.com/spf13/pflag v1.0.10
|
||||
@@ -90,6 +89,7 @@ require (
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/prometheus/common v0.70.1 // indirect
|
||||
github.com/prometheus/procfs v0.21.1 // indirect
|
||||
github.com/rhysd/actionlint v1.7.12 // indirect
|
||||
github.com/robfig/cron/v3 v3.0.1 // indirect
|
||||
github.com/sergi/go-diff v1.4.0 // indirect
|
||||
github.com/skeema/knownhosts v1.3.2 // indirect
|
||||
|
||||
Reference in New Issue
Block a user