Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
cdc6d4bc6a | ||
|
2069b04779 | ||
|
3813f40cba |
@@ -395,6 +395,7 @@ func newStepContainer(ctx context.Context, step step, image string, cmd []string
|
|||||||
Platform: rc.Config.ContainerArchitecture,
|
Platform: rc.Config.ContainerArchitecture,
|
||||||
Options: rc.Config.ContainerOptions,
|
Options: rc.Config.ContainerOptions,
|
||||||
AutoRemove: rc.Config.AutoRemove,
|
AutoRemove: rc.Config.AutoRemove,
|
||||||
|
ValidVolumes: rc.Config.ValidVolumes,
|
||||||
})
|
})
|
||||||
return stepContainer
|
return stepContainer
|
||||||
}
|
}
|
||||||
|
@@ -39,6 +39,12 @@ func (sar *stepActionRemote) prepareActionExecutor() common.Executor {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// For gitea:
|
||||||
|
// Since actions can specify the download source via a url prefix.
|
||||||
|
// The prefix may contain some sensitive information that needs to be stored in secrets,
|
||||||
|
// so we need to interpolate the expression value for uses first.
|
||||||
|
sar.Step.Uses = sar.RunContext.NewExpressionEvaluator(ctx).Interpolate(ctx, sar.Step.Uses)
|
||||||
|
|
||||||
sar.remoteAction = newRemoteAction(sar.Step.Uses)
|
sar.remoteAction = newRemoteAction(sar.Step.Uses)
|
||||||
if sar.remoteAction == nil {
|
if sar.remoteAction == nil {
|
||||||
return fmt.Errorf("Expected format {org}/{repo}[/path]@ref. Actual '%s' Input string was not in a correct format", sar.Step.Uses)
|
return fmt.Errorf("Expected format {org}/{repo}[/path]@ref. Actual '%s' Input string was not in a correct format", sar.Step.Uses)
|
||||||
@@ -215,9 +221,14 @@ type remoteAction struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (ra *remoteAction) CloneURL(u string) string {
|
func (ra *remoteAction) CloneURL(u string) string {
|
||||||
|
if ra.URL == "" {
|
||||||
if !strings.HasPrefix(u, "http://") && !strings.HasPrefix(u, "https://") {
|
if !strings.HasPrefix(u, "http://") && !strings.HasPrefix(u, "https://") {
|
||||||
u = "https://" + u
|
u = "https://" + u
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
u = ra.URL
|
||||||
|
}
|
||||||
|
|
||||||
return fmt.Sprintf("%s/%s/%s", u, ra.Org, ra.Repo)
|
return fmt.Sprintf("%s/%s/%s", u, ra.Org, ra.Repo)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -131,6 +131,7 @@ func (sd *stepDocker) newStepContainer(ctx context.Context, image string, cmd []
|
|||||||
UsernsMode: rc.Config.UsernsMode,
|
UsernsMode: rc.Config.UsernsMode,
|
||||||
Platform: rc.Config.ContainerArchitecture,
|
Platform: rc.Config.ContainerArchitecture,
|
||||||
AutoRemove: rc.Config.AutoRemove,
|
AutoRemove: rc.Config.AutoRemove,
|
||||||
|
ValidVolumes: rc.Config.ValidVolumes,
|
||||||
})
|
})
|
||||||
return stepContainer
|
return stepContainer
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user