mirror of
https://gitea.com/gitea/act_runner.git
synced 2025-06-23 14:58:00 +02:00
add forgeinstance
This commit is contained in:
@ -12,9 +12,10 @@ import (
|
||||
|
||||
// Runner runs the pipeline.
|
||||
type Runner struct {
|
||||
Machine string
|
||||
Environ map[string]string
|
||||
Client client.Client
|
||||
Machine string
|
||||
ForgeInstance string
|
||||
Environ map[string]string
|
||||
Client client.Client
|
||||
}
|
||||
|
||||
// Run runs the pipeline stage.
|
||||
@ -48,5 +49,5 @@ func (s *Runner) Run(ctx context.Context, task *runnerv1.Task) error {
|
||||
l.Info("update runner status to idle")
|
||||
}()
|
||||
|
||||
return NewTask(task.Id, s.Client).Run(ctx, task)
|
||||
return NewTask(s.ForgeInstance, task.Id, s.Client).Run(ctx, task)
|
||||
}
|
||||
|
@ -86,11 +86,11 @@ type Task struct {
|
||||
}
|
||||
|
||||
// NewTask creates a new task
|
||||
func NewTask(buildID int64, client client.Client) *Task {
|
||||
func NewTask(forgeInstance string, buildID int64, client client.Client) *Task {
|
||||
task := &Task{
|
||||
Input: &TaskInput{
|
||||
reuseContainers: true,
|
||||
ForgeInstance: "gitea",
|
||||
ForgeInstance: forgeInstance,
|
||||
},
|
||||
BuildID: buildID,
|
||||
|
||||
|
Reference in New Issue
Block a user