diff --git a/cmd/drone-build/run.go b/cmd/drone-build/run.go index 7158938f..93a848c6 100644 --- a/cmd/drone-build/run.go +++ b/cmd/drone-build/run.go @@ -27,6 +27,13 @@ type Context struct { func setup(c *Context) error { var err error + var opts = parser.DefaultOpts + + // if repository is trusted the build may specify + // custom volumes, networking and run in trusted mode. + if c.Repo.Trusted { + opts = &parser.Opts{true, true, true} + } // inject the matrix parameters into the yaml injected := inject.Inject(string(c.Yaml), c.Build.Environment)