mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2024-11-28 09:18:54 +03:00
21 lines
470 B
Go
21 lines
470 B
Go
package runtime
|
|
|
|
import (
|
|
"context"
|
|
|
|
runnerv1 "code.gitea.io/bots-proto-go/runner/v1"
|
|
"gitea.com/gitea/act_runner/client"
|
|
)
|
|
|
|
// Runner runs the pipeline.
|
|
type Runner struct {
|
|
Machine string
|
|
ForgeInstance string
|
|
Environ map[string]string
|
|
Client client.Client
|
|
}
|
|
|
|
// Run runs the pipeline stage.
|
|
func (s *Runner) Run(ctx context.Context, task *runnerv1.Task) error {
|
|
return NewTask(s.ForgeInstance, task.Id, s.Client, s.Environ).Run(ctx, task)
|
|
}
|