mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-09-15 18:57:01 +00:00
Don't interpolate joboutputs, before job is done (#894)
* Don't interpolate joboutputs, before job is donei All credits go to @ChristopherHX which fixed this issue. I only created a PR for this so it will be fixed in the upstream binary. This fixes #758 * Added output test * Fix typo
This commit is contained in:
parent
20cdc7d0ff
commit
65eea13a0b
4 changed files with 60 additions and 15 deletions
|
@ -39,19 +39,6 @@ func (sc *StepContext) execJobContainer() common.Executor {
|
|||
}
|
||||
}
|
||||
|
||||
func (sc *StepContext) interpolateOutputs() common.Executor {
|
||||
return func(ctx context.Context) error {
|
||||
ee := sc.NewExpressionEvaluator()
|
||||
for k, v := range sc.RunContext.Run.Job().Outputs {
|
||||
interpolated := ee.Interpolate(v)
|
||||
if v != interpolated {
|
||||
sc.RunContext.Run.Job().Outputs[k] = interpolated
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
type formatError string
|
||||
|
||||
func (e formatError) Error() string {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue