add exec subcommand #39

Merged
a1012112796 merged 6 commits from refs/pull/39/head into main 2023-03-08 02:55:31 +00:00
a1012112796 commented 2023-03-06 10:23:22 +00:00 (Migrated from gitea.com)

most code are copyed from https://gitea.com/gitea/act/src/branch/main/cmd
and do some small change to make it run again

examples:

./act_runner exec -l
./act_runner -j lint
./act_runner -j lint -n

some example result:

屏幕截图 2023-03-06 135735

屏幕截图 2023-03-06 140643

Signed-off-by: a1012112796 1012112796@qq.com

fix #32

most code are copyed from https://gitea.com/gitea/act/src/branch/main/cmd and do some small change to make it run again examples: ```SHELL ./act_runner exec -l ./act_runner -j lint ./act_runner -j lint -n ``` some example result: ![屏幕截图 2023-03-06 135735](/attachments/547bd05c-ade2-41f7-ba60-c9937fa32d5f) ![屏幕截图 2023-03-06 140643](/attachments/e8f48dba-c7f3-4daa-a163-aa9b36b1dc32) Signed-off-by: a1012112796 <1012112796@qq.com> fix #32
lunny (Migrated from gitea.com) reviewed 2023-03-06 10:26:03 +00:00
@@ -0,0 +18,4 @@
"github.com/nektos/act/pkg/common"
"github.com/nektos/act/pkg/model"
"github.com/nektos/act/pkg/runner"
log "github.com/sirupsen/logrus"
lunny (Migrated from gitea.com) commented 2023-03-06 10:26:03 +00:00

duplicated import

duplicated import
wolfogre (Migrated from gitea.com) reviewed 2023-03-06 10:35:42 +00:00
@@ -0,0 +248,4 @@
artifactCancel := artifacts.Serve(ctx, input.artifactServerPath, input.artifactServerPort)
t.log.Debugf("artifacts server started at %s:%s", input.artifactServerPath, input.artifactServerPort)
executor := r.NewPlanExecutor(plan).Finally(func(ctx context.Context) error {
wolfogre (Migrated from gitea.com) commented 2023-03-06 10:35:42 +00:00

It will override initLogging.

It will override `initLogging`.
a1012112796 (Migrated from gitea.com) reviewed 2023-03-06 10:40:05 +00:00
a1012112796 (Migrated from gitea.com) reviewed 2023-03-06 10:41:47 +00:00
lunny (Migrated from gitea.com) reviewed 2023-03-06 11:58:33 +00:00
@@ -0,0 +57,4 @@
rootCmd.AddCommand(daemonCmd)
// ./act_runner exec
rootCmd.AddCommand(loadExecCmd(ctx))
lunny (Migrated from gitea.com) commented 2023-03-06 11:58:33 +00:00

If it's copied from act, we need to add copyright of act on the head.

If it's copied from act, we need to add copyright of act on the head.
lunny (Migrated from gitea.com) reviewed 2023-03-06 14:21:52 +00:00
@@ -0,0 +248,4 @@
artifactCancel := artifacts.Serve(ctx, input.artifactServerPath, input.artifactServerPort)
t.log.Debugf("artifacts server started at %s:%s", input.artifactServerPath, input.artifactServerPort)
executor := r.NewPlanExecutor(plan).Finally(func(ctx context.Context) error {
lunny (Migrated from gitea.com) commented 2023-03-06 14:21:52 +00:00

This could be another PR?

This could be another PR?
lunny (Migrated from gitea.com) approved these changes 2023-03-07 15:07:33 +00:00
wolfogre (Migrated from gitea.com) approved these changes 2023-03-08 01:53:34 +00:00
Sign in to join this conversation.