Interpolate runs-on with variables when scheduling tasks (#30640)
Follow #29468 1. Interpolate runs-on with variables when scheduling tasks. 2. The `GetVariablesOfRun` function will check if the `Repo` of the run is nil. --------- Co-authored-by: Giteabot <teabot@gitea.io> (cherry picked from commit 2f6b1c46a1a4a90f56ca0f3ad7840e8e70daeab5) Conflicts: services/actions/schedule_tasks.go trivial conflict because of 'Add vars context to cron jobs (#3059)'
This commit is contained in:
parent
a72b660cbb
commit
561a7cf520
3 changed files with 23 additions and 11 deletions
|
@ -132,13 +132,10 @@ func CreateScheduleTask(ctx context.Context, cron *actions_model.ActionSchedule)
|
|||
Status: actions_model.StatusWaiting,
|
||||
}
|
||||
|
||||
if err := run.LoadAttributes(ctx); err != nil {
|
||||
log.Error("LoadAttributes: %v", err)
|
||||
}
|
||||
|
||||
vars, err := actions_model.GetVariablesOfRun(ctx, run)
|
||||
if err != nil {
|
||||
log.Error("GetVariablesOfSchedule: %v", err)
|
||||
log.Error("GetVariablesOfRun: %v", err)
|
||||
return err
|
||||
}
|
||||
|
||||
// Parse the workflow specification from the cron schedule
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue