feat: don't require docker #16

Merged
lunny merged 1 commits from :docker_is_optional into main 2023-01-27 12:42:03 +00:00
Contributor

The only reason docker is really required by now, is that act_runner ping docker.
This change only pings docker if a label with docker:// is added to the runner.

Plain labels without : like self-hosted are run directly on the system. Previously the pseudo non docker label -self-hosted have been required like this self-hosted:docker://-self-hosted, but due to docker ping this still required a dockerd to be pingable.

The only reason docker is really required by now, is that act_runner ping docker. This change only pings docker if a label with `docker://` is added to the runner. Plain labels without `:` like `self-hosted` are run directly on the system. Previously the pseudo non docker label `-self-hosted` have been required like this `self-hosted:docker://-self-hosted`, but due to docker ping this still required a dockerd to be pingable.
ChristopherHX added 1 commit 2023-01-21 20:50:25 +00:00
delvh reviewed 2023-01-21 21:05:57 +00:00
@ -123,2 +122,4 @@
if len(values) > 2 {
return fmt.Errorf("Invalid label: %s", label)
}
// len(values) == 1, label for non docker execution environment
Owner

label for non docker execution environment (self-hosted)

`label for non docker execution environment (self-hosted)`
@ -29,3 +30,4 @@
for _, l := range s.Labels {
// "ubuntu-18.04:docker://node:16-buster"
splits := strings.SplitN(l, ":", 2)
if len(splits) == 1 {
Owner

== 1 { // only the "self-hosted" label is allowed without :

`== 1 { // only the "self-hosted" label is allowed without :`
Author
Contributor

Are you suggesting to adding the comment? I'm not 100% shure what you mean, because you can also use ubuntu-latest if you want to run these labels without docker.

Are you suggesting to adding the comment? I'm not 100% shure what you mean, because you can also use `ubuntu-latest` if you want to run these labels without docker.
Owner

Okay, yeah, I thought this would only apply to the self-hosted label.

Okay, yeah, I thought this would only apply to the `self-hosted` label.
delvh marked this conversation as resolved
wolfogre approved these changes 2023-01-27 07:08:34 +00:00
lunny approved these changes 2023-01-27 11:46:31 +00:00
Owner

@ChristopherHX please update the branch

@ChristopherHX please update the branch
ChristopherHX force-pushed docker_is_optional from 5df468aa05 to c142cda688 2023-01-27 12:37:50 +00:00 Compare
Author
Contributor

Done.

Done.
lunny merged commit 990cf93c71 into main 2023-01-27 12:42:03 +00:00
Sign in to join this conversation.
No description provided.