mirror of https://code.forgejo.org/forgejo/runner
chore(register): update proto file.
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>pull/2/head
parent
3a1503138b
commit
c161a48a0a
11
README.md
11
README.md
|
@ -1,3 +1,14 @@
|
|||
# act runner
|
||||
|
||||
Act runner is a runner for Forges supports Github Actions protocol.
|
||||
|
||||
## Rigister
|
||||
|
||||
create a new file as name `.env`
|
||||
|
||||
```sh
|
||||
GITEA_RUNNER_NAME=foobar
|
||||
GITEA_RUNNER_URL=localhost:3001/foo/bar
|
||||
GITEA_RUNNER_TOKEN=1234567890abcde
|
||||
GITEA_RUNNER_LABELS=foo,bar
|
||||
```
|
||||
|
|
|
@ -32,8 +32,8 @@ type (
|
|||
|
||||
Runner struct {
|
||||
Name string `envconfig:"GITEA_RUNNER_NAME"`
|
||||
URL string `envconfig:"GITEA_URL" required:"true"`
|
||||
Token string `envconfig:"GITEA_TOKEN" required:"true"`
|
||||
URL string `envconfig:"GITEA_RUNNER_URL" required:"true"`
|
||||
Token string `envconfig:"GITEA_RUNNER_TOKEN" required:"true"`
|
||||
Capacity int `envconfig:"GITEA_RUNNER_CAPACITY" default:"1"`
|
||||
Environ map[string]string `envconfig:"GITEA_RUNNER_ENVIRON"`
|
||||
EnvFile string `envconfig:"GITEA_RUNNER_ENV_FILE"`
|
||||
|
|
2
go.mod
2
go.mod
|
@ -3,7 +3,7 @@ module gitea.com/gitea/act_runner
|
|||
go 1.18
|
||||
|
||||
require (
|
||||
gitea.com/gitea/proto-go v0.0.0-20221002020351-750a3b99a850
|
||||
gitea.com/gitea/proto-go v0.0.0-20221007122649-939e445f4abb
|
||||
github.com/appleboy/com v0.1.6
|
||||
github.com/avast/retry-go/v4 v4.1.0
|
||||
github.com/bufbuild/connect-go v0.5.0
|
||||
|
|
2
go.sum
2
go.sum
|
@ -27,6 +27,8 @@ gitea.com/gitea/act v0.0.0-20220922135643-52a5bba9e7fa h1:HHqlvfIvqFlny3sgJgAM1B
|
|||
gitea.com/gitea/act v0.0.0-20220922135643-52a5bba9e7fa/go.mod h1:9W/Nz16tjfnWp7O5DUo3EjZBnZFBI/5rlWstX4o7+hU=
|
||||
gitea.com/gitea/proto-go v0.0.0-20221002020351-750a3b99a850 h1:BDnr9A52zCPb5BH64yTm8cIfhhjTvql0u6QvWjJViGo=
|
||||
gitea.com/gitea/proto-go v0.0.0-20221002020351-750a3b99a850/go.mod h1:hD8YwSHusjwjEEgubW6XFvnZuNhMZTHz6lwjfltEt/Y=
|
||||
gitea.com/gitea/proto-go v0.0.0-20221007122649-939e445f4abb h1:Wi8BEd1hStpvZW0PUP6W74mQRMJOJ/EhPoqWW5dcHQc=
|
||||
gitea.com/gitea/proto-go v0.0.0-20221007122649-939e445f4abb/go.mod h1:hD8YwSHusjwjEEgubW6XFvnZuNhMZTHz6lwjfltEt/Y=
|
||||
github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
|
||||
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8=
|
||||
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8=
|
||||
|
|
|
@ -50,11 +50,11 @@ func (p *Poller) Register(ctx context.Context, cfg config.Runner) error {
|
|||
|
||||
// register new runner.
|
||||
resp, err := p.Client.Register(ctx, connect.NewRequest(&runnerv1.RegisterRequest{
|
||||
Os: p.Filter.OS,
|
||||
Arch: p.Filter.Arch,
|
||||
Labels: p.Filter.Labels,
|
||||
Name: cfg.Name,
|
||||
Token: cfg.Token,
|
||||
Url: cfg.URL,
|
||||
AgentLabels: []string{p.Filter.OS, p.Filter.Arch},
|
||||
CustomLabels: p.Filter.Labels,
|
||||
}))
|
||||
if err != nil {
|
||||
log.WithError(err).Error("poller: cannot register new runner")
|
||||
|
|
Loading…
Reference in New Issue