act/pkg/jobparser
Zettat123 6b1010ad07 Fix potential panic caused by nil Step (#48)
```yml
jobs:
  job1:
    steps:
      - run: echo HelloWorld
      - # empty step
```

If a job contains an empty step, `Job.Steps` will have a nil element and will cause panic when calling `Step.String()`.

See [the code of gitea](948a9ee5e8/models/actions/task.go (L300-L301))

Reviewed-on: https://gitea.com/gitea/act/pulls/48
Co-authored-by: Zettat123 <zettat123@gmail.com>
Co-committed-by: Zettat123 <zettat123@gmail.com>
2023-04-21 14:45:38 +08:00
..
testdata Parse secret inputs in reusable workflows (#41) 2023-04-17 13:41:02 +08:00
evaluator.go Add custom enhancements 2022-11-22 14:16:35 +08:00
interpeter.go Support configuration variables (#43) 2023-04-19 15:22:56 +08:00
jobparser.go Avoid using log.Fatal in pkg/* (#39) 2023-04-07 16:31:03 +08:00
jobparser_test.go Parse secret inputs in reusable workflows (#41) 2023-04-17 13:41:02 +08:00
model.go Fix potential panic caused by nil Step (#48) 2023-04-21 14:45:38 +08:00
model_test.go Expose SetJob to make EraseNeeds work (#35) 2023-03-29 13:57:29 +08:00
testdata_test.go Expose SetJob to make EraseNeeds work (#35) 2023-03-29 13:57:29 +08:00