mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-08-06 17:40:58 +00:00
fix: return error if both run:
/uses:
keys are used (#593)
fixes https://github.com/nektos/act/issues/536
This commit is contained in:
parent
ac92a02474
commit
ac3046915e
5 changed files with 55 additions and 2 deletions
|
@ -292,11 +292,17 @@ const (
|
|||
|
||||
// StepTypeUsesActionRemote is all steps that have a `uses` that is a reference to a github repo
|
||||
StepTypeUsesActionRemote
|
||||
|
||||
// StepTypeInvalid is for steps that have invalid step action
|
||||
StepTypeInvalid
|
||||
)
|
||||
|
||||
// Type returns the type of the step
|
||||
func (s *Step) Type() StepType {
|
||||
if s.Run != "" {
|
||||
if s.Uses != "" {
|
||||
return StepTypeInvalid
|
||||
}
|
||||
return StepTypeRun
|
||||
} else if strings.HasPrefix(s.Uses, "docker://") {
|
||||
return StepTypeUsesDockerURL
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue