mirror of https://code.forgejo.org/forgejo/runner
add --gitea-instance (#245)
add --gitea-instance to let user specify address of endpoint of exec Related to https://gitea.com/gitea/act/pulls/68. Both can be merged independently though. Reviewed-on: https://gitea.com/gitea/act_runner/pulls/245 Reviewed-by: Jason Song <i@wolfogre.com> Co-authored-by: Tomasz Duda <tomaszduda23@gmail.com> Co-committed-by: Tomasz Duda <tomaszduda23@gmail.com>pull/41/head
parent
054c8d912f
commit
2e2c0400c8
|
@ -58,6 +58,7 @@ type executeArgs struct {
|
||||||
image string
|
image string
|
||||||
cacheHandler *artifactcache.Handler
|
cacheHandler *artifactcache.Handler
|
||||||
network string
|
network string
|
||||||
|
githubInstance string
|
||||||
}
|
}
|
||||||
|
|
||||||
// WorkflowsPath returns path to workflow file(s)
|
// WorkflowsPath returns path to workflow file(s)
|
||||||
|
@ -392,7 +393,7 @@ func runExec(ctx context.Context, execArgs *executeArgs) func(cmd *cobra.Command
|
||||||
ContainerArchitecture: execArgs.containerArchitecture,
|
ContainerArchitecture: execArgs.containerArchitecture,
|
||||||
ContainerDaemonSocket: execArgs.containerDaemonSocket,
|
ContainerDaemonSocket: execArgs.containerDaemonSocket,
|
||||||
UseGitIgnore: execArgs.useGitIgnore,
|
UseGitIgnore: execArgs.useGitIgnore,
|
||||||
// GitHubInstance: t.client.Address(),
|
GitHubInstance: execArgs.githubInstance,
|
||||||
ContainerCapAdd: execArgs.containerCapAdd,
|
ContainerCapAdd: execArgs.containerCapAdd,
|
||||||
ContainerCapDrop: execArgs.containerCapDrop,
|
ContainerCapDrop: execArgs.containerCapDrop,
|
||||||
ContainerOptions: execArgs.containerOptions,
|
ContainerOptions: execArgs.containerOptions,
|
||||||
|
@ -477,6 +478,7 @@ func loadExecCmd(ctx context.Context) *cobra.Command {
|
||||||
execCmd.PersistentFlags().BoolVarP(&execArg.dryrun, "dryrun", "n", false, "dryrun mode")
|
execCmd.PersistentFlags().BoolVarP(&execArg.dryrun, "dryrun", "n", false, "dryrun mode")
|
||||||
execCmd.PersistentFlags().StringVarP(&execArg.image, "image", "i", "node:16-bullseye", "docker image to use")
|
execCmd.PersistentFlags().StringVarP(&execArg.image, "image", "i", "node:16-bullseye", "docker image to use")
|
||||||
execCmd.PersistentFlags().StringVarP(&execArg.network, "network", "", "", "Specify the network to which the container will connect")
|
execCmd.PersistentFlags().StringVarP(&execArg.network, "network", "", "", "Specify the network to which the container will connect")
|
||||||
|
execCmd.PersistentFlags().StringVarP(&execArg.githubInstance, "gitea-instance", "", "", "Gitea instance to use.")
|
||||||
|
|
||||||
return execCmd
|
return execCmd
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue