mirror of
https://gitea.com/gitea/act_runner.git
synced 2025-12-16 19:14:46 +00:00
Compare commits
2 Commits
054c8d912f
...
32d29f0813
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
32d29f0813 | ||
|
|
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,15 +393,15 @@ 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,
|
||||||
AutoRemove: true,
|
AutoRemove: true,
|
||||||
ArtifactServerPath: execArgs.artifactServerPath,
|
ArtifactServerPath: execArgs.artifactServerPath,
|
||||||
ArtifactServerPort: execArgs.artifactServerPort,
|
ArtifactServerPort: execArgs.artifactServerPort,
|
||||||
ArtifactServerAddr: execArgs.artifactServerAddr,
|
ArtifactServerAddr: execArgs.artifactServerAddr,
|
||||||
NoSkipCheckout: execArgs.noSkipCheckout,
|
NoSkipCheckout: execArgs.noSkipCheckout,
|
||||||
// PresetGitHubContext: preset,
|
// PresetGitHubContext: preset,
|
||||||
// EventJSON: string(eventJSON),
|
// EventJSON: string(eventJSON),
|
||||||
ContainerNamePrefix: fmt.Sprintf("GITEA-ACTIONS-TASK-%s", eventName),
|
ContainerNamePrefix: fmt.Sprintf("GITEA-ACTIONS-TASK-%s", eventName),
|
||||||
@@ -413,6 +414,8 @@ func runExec(ctx context.Context, execArgs *executeArgs) func(cmd *cobra.Command
|
|||||||
ValidVolumes: []string{"**"}, // All volumes are allowed for `exec` command
|
ValidVolumes: []string{"**"}, // All volumes are allowed for `exec` command
|
||||||
}
|
}
|
||||||
|
|
||||||
|
config.Env["ACT_EXEC"] = "true"
|
||||||
|
|
||||||
if !execArgs.debug {
|
if !execArgs.debug {
|
||||||
logLevel := log.Level(log.InfoLevel)
|
logLevel := log.Level(log.InfoLevel)
|
||||||
config.JobLoggerLevel = &logLevel
|
config.JobLoggerLevel = &logLevel
|
||||||
@@ -477,6 +480,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
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user