hello, I think we can add a subcommand named as ./act_runner exec [...other options] to run a action in curent machine. that's similar with drone cli tool: https://docs.drone.io/cli/drone-exec/. I think it's verry usefull for development and test.
looks a big problem is how to skip actions/checkout@v3 step.
hello, I think we can add a subcommand named as `./act_runner exec [...other options]` to run a action in curent machine. that's similar with drone cli tool: https://docs.drone.io/cli/drone-exec/. I think it's verry usefull for development and test.
looks a big problem is how to skip `actions/checkout@v3` step.
looks ./act is what I want, but it can't run. wonder why?
looks ./act is what I want, but it can't run. wonder why?


Seems like I made a mistake in ignoring the error and go panicked, for rootfull container it works without getting the user and group id.
I'm not shure why you are the first one who reported this bug, does your container have the `id` tool?
This code needs to be changed to just `return nil` if matchstring is empty
https://github.com/nektos/act/blob/21ea3d0d5fc92cf9ae93c62c0af7ec3a5da36541/pkg/container/docker_run.go#L586
this error not exist now, but found another error ...
[checks/check and test] ? docker cp src=/home/zzc/.cache/act/actions-setup-go@v3/ dst=/var/run/act/actions/actions-setup-go@v3/
[checks/check and test] [DEBUG] Writing tarball /tmp/act1650802029 from /home/zzc/.cache/act/actions-setup-go@v3/
[checks/check and test] [DEBUG] Stripping prefix:/home/zzc/.cache/act/actions-setup-go@v3/ src:/home/zzc/.cache/act/actions-setup-go@v3/
[checks/check and test] [DEBUG] Extracting content from '/tmp/act1650802029' to '/var/run/act/actions/actions-setup-go@v3/'
[checks/check and test] [DEBUG] executing remote job container: [node /var/run/act/actions/actions-setup-go@v3/dist/setup/index.js]
[checks/check and test] ? docker exec cmd=[node /var/run/act/actions/actions-setup-go@v3/dist/setup/index.js] user= workdir=
[checks/check and test] [DEBUG] Exec command '[node /var/run/act/actions/actions-setup-go@v3/dist/setup/index.js]'
[checks/check and test] [DEBUG] Working directory '/home/zzc/gitea_ws/act_runner'
[checks/check and test] ❌ Failure - Main actions/setup-go@v3
[checks/check and test] failed to create exec: Error response from daemon: Container 2d020b7fddfc9569845951861b783e4ec422a25e283e66a1e43da559098c35dd is not running
[checks/check and test] [DEBUG] Loading slug from git directory '/home/zzc/gitea_ws/act_runner/.git'
> Seems like I made a mistake in ignoring the error and go panicked, for rootfull container it works without getting the user and group id.
>
> I'm not shure why you are the first one who reported this bug, does your container have the `id` tool?
>
> This code needs to be changed to just `return nil` if matchstring is empty
> https://github.com/nektos/act/blob/21ea3d0d5fc92cf9ae93c62c0af7ec3a5da36541/pkg/container/docker_run.go#L586
this error not exist now, but found another error ...
```
[checks/check and test] ? docker cp src=/home/zzc/.cache/act/actions-setup-go@v3/ dst=/var/run/act/actions/actions-setup-go@v3/
[checks/check and test] [DEBUG] Writing tarball /tmp/act1650802029 from /home/zzc/.cache/act/actions-setup-go@v3/
[checks/check and test] [DEBUG] Stripping prefix:/home/zzc/.cache/act/actions-setup-go@v3/ src:/home/zzc/.cache/act/actions-setup-go@v3/
[checks/check and test] [DEBUG] Extracting content from '/tmp/act1650802029' to '/var/run/act/actions/actions-setup-go@v3/'
[checks/check and test] [DEBUG] executing remote job container: [node /var/run/act/actions/actions-setup-go@v3/dist/setup/index.js]
[checks/check and test] ? docker exec cmd=[node /var/run/act/actions/actions-setup-go@v3/dist/setup/index.js] user= workdir=
[checks/check and test] [DEBUG] Exec command '[node /var/run/act/actions/actions-setup-go@v3/dist/setup/index.js]'
[checks/check and test] [DEBUG] Working directory '/home/zzc/gitea_ws/act_runner'
[checks/check and test] ❌ Failure - Main actions/setup-go@v3
[checks/check and test] failed to create exec: Error response from daemon: Container 2d020b7fddfc9569845951861b783e4ec422a25e283e66a1e43da559098c35dd is not running
[checks/check and test] [DEBUG] Loading slug from git directory '/home/zzc/gitea_ws/act_runner/.git'
```
full log is here: [log.txt](/attachments/4b4463ab-5cc3-4721-9a61-3a51c54a9d17)
code changs:
```DIFF
diff --git a/cmd/root.go b/cmd/root.go
index 3073b0f..ea83fc7 100644
--- a/cmd/root.go
+++ b/cmd/root.go
@@ -448,6 +448,7 @@ func newRunCommand(ctx context.Context, input *Input) func(*cobra.Command, []str
RemoteName: input.remoteName,
ReplaceGheActionWithGithubCom: input.replaceGheActionWithGithubCom,
ReplaceGheActionTokenWithGithubCom: input.replaceGheActionTokenWithGithubCom,
+ DefaultActionInstance: "https://gitea.com",
}
r, err := runner.New(config)
if err != nil {
diff --git a/pkg/container/docker_run.go b/pkg/container/docker_run.go
index 351cf32..50b2c57 100644
--- a/pkg/container/docker_run.go
+++ b/pkg/container/docker_run.go
@@ -706,6 +706,10 @@ func (cr *containerReference) tryReadID(opt string, cbk func(id int)) common.Exe
}
exp := regexp.MustCompile(`\d+\n`)
found := exp.FindString(sid)
+ if len(found) == 0 {
+ return nil
+ }
+
id, err := strconv.ParseInt(found[:len(found)-1], 10, 32)
if err != nil {
return nil
```
sleep 0 is your entrypoint, seems like the act fork of gitea cannot be directly used.
The container stops too early, nektos act has a different entrypoint (tail...).
`sleep 0` is your entrypoint, seems like the act fork of gitea cannot be directly used.
The container stops too early, nektos act has a different entrypoint (tail...).
sleep 0 is your entrypoint, seems like the act fork of gitea cannot be directly used.
The container stops too early, nektos act has a different entrypoint (tail...).
Hmm, may be need more checking, the unit test in act repo also faild with same reason. by the way, in previous test, I hasn't define new workflow file, just use the workflow file in this repo.
> `sleep 0` is your entrypoint, seems like the act fork of gitea cannot be directly used.
>
> The container stops too early, nektos act has a different entrypoint (tail...).
Hmm, may be need more checking, the unit test in `act` repo also faild with same reason. by the way, in previous test, I hasn't define new workflow file, just use the workflow file in this repo.
```bash
../act/dist/local/act -W ./.gitea/workflows -j lint
```
The forked act is designed as a package for act_runner only, not replacing nektos/act. I believe it will be better to use nektos/act to run workflows locally.
The forked act is designed as a package for act_runner only, not replacing nektos/act. I believe it will be better to use nektos/act to run workflows locally.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
hello, I think we can add a subcommand named as
./act_runner exec [...other options]to run a action in curent machine. that's similar with drone cli tool: https://docs.drone.io/cli/drone-exec/. I think it's verry usefull for development and test.looks a big problem is how to skip
actions/checkout@v3step.looks ./act is what I want, but it can't run. wonder why?
Seems like I made a mistake in ignoring the error and go panicked, for rootfull container it works without getting the user and group id.
I'm not shure why you are the first one who reported this bug, does your container have the
idtool?This code needs to be changed to just
return nilif matchstring is emptyhttps://github.com/nektos/act/blob/21ea3d0d5fc92cf9ae93c62c0af7ec3a5da36541/pkg/container/docker_run.go#L586
this error not exist now, but found another error ...
full log is here: log.txt
code changs:
sleep 0is your entrypoint, seems like the act fork of gitea cannot be directly used.The container stops too early, nektos act has a different entrypoint (tail...).
Hmm, may be need more checking, the unit test in
actrepo also faild with same reason. by the way, in previous test, I hasn't define new workflow file, just use the workflow file in this repo.DefaultActionInstanceshould be retrieved from Gitea side not hardcode.The forked act is designed as a package for act_runner only, not replacing nektos/act. I believe it will be better to use nektos/act to run workflows locally.