mirror of
https://gitea.com/gitea/runner.git
synced 2026-11-06 07:10:28 +00:00
Add support for composite actions (#514)
* Add support for composite actions * Fix to make more complex composite actions work * Fix to make more complex composite actions work * Let's validate the steps in the composite steps to fail on uses and run's without shell, like the real world * Add support for composite actions * Add workflow to test composite actions * Log instead of panicing when output is mismatched * Merge maps so environment variables are not lost * Remove Debug * Correect merge error * Remove invalid composite tests. * Fix composite test Co-authored-by: Casey Lee <[email protected]> Co-authored-by: monkers <[email protected]> Co-authored-by: Mike Moncrieffe <[email protected]>
This commit is contained in:
11 files changed
+236
-16
No files matched your search
@@ -312,6 +312,15 @@ func (s *Step) Type() StepType {
|
||||
return StepTypeUsesActionRemote
|
||||
}
|
||||
|
||||
func (s *Step) Validate() error {
|
||||
if s.Type() != StepTypeRun {
|
||||
return fmt.Errorf("(StepID: %s): Unexpected value 'uses'", s.String())
|
||||
} else if s.Shell == "" {
|
||||
return fmt.Errorf("(StepID: %s): Required property is missing: 'shell'", s.String())
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// ReadWorkflow returns a list of jobs for a given workflow file reader
|
||||
func ReadWorkflow(in io.Reader) (*Workflow, error) {
|
||||
w := new(Workflow)
|
||||
|
||||
Reference in new issue
Block a user